mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Don't use LLVMRustStringWriteImpl
outside of RawRustStringOstream
This commit is contained in:
parent
6295686a37
commit
730626dbd9
@ -1624,5 +1624,6 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
|
||||
CfiFunctionDefs, CfiFunctionDecls);
|
||||
#endif
|
||||
|
||||
LLVMRustStringWriteImpl(KeyOut, Key.c_str(), Key.size());
|
||||
auto OS = RawRustStringOstream(KeyOut);
|
||||
OS << Key.str();
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user