1
Fork 0

Make RustString an extern type to avoid improper_ctypes warnings

This commit is contained in:
Zalathar 2024-11-03 12:40:26 +11:00
parent 730626dbd9
commit 89d7efaf8f
4 changed files with 58 additions and 46 deletions

View file

@ -104,8 +104,9 @@ typedef struct OpaqueRustString *RustStringRef;
typedef struct LLVMOpaqueTwine *LLVMTwineRef;
typedef struct LLVMOpaqueSMDiagnostic *LLVMSMDiagnosticRef;
extern "C" void LLVMRustStringWriteImpl(RustStringRef Str, const char *Ptr,
size_t Size);
extern "C" void LLVMRustStringWriteImpl(RustStringRef buf,
const char *slice_ptr,
size_t slice_len);
class RawRustStringOstream : public llvm::raw_ostream {
RustStringRef Str;