about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-25 14:28:04 +0000
committerbors <bors@rust-lang.org>2022-09-25 14:28:04 +0000
commit17e8752acafe7240f38bcb114586ff0568224cad (patch)
tree66e818d3b7bd502f2f14853901e73e6a6823e287 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent4652f5eb25b76c24fc40b7267d87a07d5876901f (diff)
parentc50303ca1ff0266c08678047e7f05e88a2cadac4 (diff)
downloadrust-17e8752acafe7240f38bcb114586ff0568224cad.tar.gz
rust-17e8752acafe7240f38bcb114586ff0568224cad.zip
Auto merge of #102265 - fee1-dead-contrib:rollup-a7fccbg, r=fee1-dead
Rollup of 8 pull requests

Successful merges:

 - #98111 (Clarify `[T]::select_nth_unstable*` return values)
 - #101431 (Look at move place's type when suggesting mutable reborrow)
 - #101800 (Constify slice.split_at_mut(_unchecked))
 - #101997 (Remove support for legacy PM)
 - #102194 (Note the type when unable to drop values in compile time)
 - #102200 (Constify Default impl's for Arrays and Tuples.)
 - #102245 (Constify cmp_min_max_by.)
 - #102259 (Type-annotate and simplify documentation of Option::unwrap_or_default)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp8
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();
 }