diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-03 18:23:59 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-08 22:31:32 +1100 |
| commit | 730626dbd924d7fbf3873bcf1da783f486efd1d7 (patch) | |
| tree | 25cfebe89ed1baa22a4bc1a71de8a87c742b2b22 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 6295686a37ed731f1059b07157170c9ac56bf8c3 (diff) | |
| download | rust-730626dbd924d7fbf3873bcf1da783f486efd1d7.tar.gz rust-730626dbd924d7fbf3873bcf1da783f486efd1d7.zip | |
Don't use `LLVMRustStringWriteImpl` outside of `RawRustStringOstream`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index a68eed03e61..f739b010c30 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1510,8 +1510,8 @@ LLVMRustUnpackSMDiagnostic(LLVMSMDiagnosticRef DRef, RustStringRef MessageOut, const SourceMgr &LSM = *D.getSourceMgr(); const MemoryBuffer *LBuf = LSM.getMemoryBuffer(LSM.FindBufferContainingLoc(D.getLoc())); - LLVMRustStringWriteImpl(BufferOut, LBuf->getBufferStart(), - LBuf->getBufferSize()); + auto BufferOS = RawRustStringOstream(BufferOut); + BufferOS << LBuf->getBuffer(); *LocOut = D.getLoc().getPointer() - LBuf->getBufferStart(); |
