diff options
| author | bors <bors@rust-lang.org> | 2022-10-21 10:21:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-21 10:21:17 +0000 |
| commit | befc94e691ae36c2fad134e1cdf483b7bdeeb74f (patch) | |
| tree | 295eb20dddee89560f4e67c9fc14937611688207 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 53e357748675b387b6d25fe563b960cb7a7a0aea (diff) | |
| parent | bb911ce32aeef2d691af993d0a1696d8402998a9 (diff) | |
| download | rust-befc94e691ae36c2fad134e1cdf483b7bdeeb74f.tar.gz rust-befc94e691ae36c2fad134e1cdf483b7bdeeb74f.zip | |
Auto merge of #2607 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index b2cfcf53c59..6f36281af23 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -12,7 +12,7 @@ #include "llvm/Object/COFFImportFile.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Pass.h" -#include "llvm/Bitcode/BitcodeWriterPass.h" +#include "llvm/Bitcode/BitcodeWriter.h" #include "llvm/Support/Signals.h" #include "llvm/ADT/Optional.h" @@ -1670,11 +1670,7 @@ LLVMRustModuleBufferCreate(LLVMModuleRef M) { auto Ret = std::make_unique<LLVMRustModuleBuffer>(); { raw_string_ostream OS(Ret->data); - { - legacy::PassManager PM; - PM.add(createBitcodeWriterPass(OS)); - PM.run(*unwrap(M)); - } + WriteBitcodeToFile(*unwrap(M), OS); } return Ret.release(); } |
