From 730626dbd924d7fbf3873bcf1da783f486efd1d7 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sun, 3 Nov 2024 18:23:59 +1100 Subject: Don't use `LLVMRustStringWriteImpl` outside of `RawRustStringOstream` --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp') diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index eb99d560e57..6f47ee88add 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -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(); } -- cgit 1.4.1-3-g733a5