diff options
| author | bors <bors@rust-lang.org> | 2024-03-07 00:04:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-07 00:04:02 +0000 |
| commit | d03b986db1f4146b58078c9dde5b0fa6d808f031 (patch) | |
| tree | ef91b65adefe2107711823fff9abbcb37e648745 /compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp | |
| parent | 7d3702e472b99be0f5de6608dd87af1df8f99428 (diff) | |
| parent | 5642b0418667b4d4db1faa35b3b60f67b7fb644d (diff) | |
| download | rust-d03b986db1f4146b58078c9dde5b0fa6d808f031.tar.gz rust-d03b986db1f4146b58078c9dde5b0fa6d808f031.zip | |
Auto merge of #122117 - matthiaskrgr:rollup-3yrv3j6, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #122015 (Add better explanation for `rustc_index::IndexVec`) - #122061 (Clarify FatalErrorHandler) - #122062 (Explicitly assign constructed C++ classes) - #122072 (Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slices) - #122088 (Remove unnecessary fixme on new thread stack size) - #122094 (Remove outdated footnote "missing-stack-probe" in platform-support) - #122107 (Temporarily make allow-by-default the `non_local_definitions` lint) - #122109 (compiletest: Add a `//@ needs-threads` directive) Failed merges: - #122104 (Rust is a proper name: rust → Rust) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp index 91f84692df8..ee8239ef8e7 100644 --- a/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/IR/LLVMContext.h" #include "llvm/Object/ObjectFile.h" +#include <llvm/Support/raw_ostream.h> using namespace llvm; using namespace llvm::sys; @@ -42,7 +43,7 @@ extern "C" void *LLVMRustGetSymbols( MemoryBuffer::getMemBuffer(StringRef(BufPtr, BufLen), StringRef("LLVMRustGetSymbolsObject"), false); SmallString<0> SymNameBuf; - raw_svector_ostream SymName(SymNameBuf); + auto SymName = raw_svector_ostream(SymNameBuf); // In the scenario when LLVMContext is populated SymbolicFile will contain a // reference to it, thus SymbolicFile should be destroyed first. @@ -60,7 +61,7 @@ extern "C" void *LLVMRustGetSymbols( if (!ObjOrErr) { Error E = ObjOrErr.takeError(); SmallString<0> ErrorBuf; - raw_svector_ostream Error(ErrorBuf); + auto Error = raw_svector_ostream(ErrorBuf); Error << E << '\0'; return ErrorCallback(Error.str().data()); } @@ -70,7 +71,7 @@ extern "C" void *LLVMRustGetSymbols( if (!ObjOrErr) { Error E = ObjOrErr.takeError(); SmallString<0> ErrorBuf; - raw_svector_ostream Error(ErrorBuf); + auto Error = raw_svector_ostream(ErrorBuf); Error << E << '\0'; return ErrorCallback(Error.str().data()); } @@ -83,7 +84,7 @@ extern "C" void *LLVMRustGetSymbols( continue; if (Error E = S.printName(SymName)) { SmallString<0> ErrorBuf; - raw_svector_ostream Error(ErrorBuf); + auto Error = raw_svector_ostream(ErrorBuf); Error << E << '\0'; return ErrorCallback(Error.str().data()); } |
