about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-07 20:27:43 +0000
committerbors <bors@rust-lang.org>2025-09-07 20:27:43 +0000
commit12eb345e5593a10e61b4aef766076c8bd552fea6 (patch)
tree6d0b3872c9b314438868f0ee31bf22b8ff2be7ee /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent23718020b12d7e5a54f82a19910e8356ee719667 (diff)
parent36557d1046da672559bda949afa8256add67058b (diff)
downloadrust-12eb345e5593a10e61b4aef766076c8bd552fea6.tar.gz
rust-12eb345e5593a10e61b4aef766076c8bd552fea6.zip
Auto merge of #146304 - matthiaskrgr:rollup-69hs07h, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#146170 (fix: offline rustdoc html missing favicon)
 - rust-lang/rust#146209 (Misc LTO cleanups)
 - rust-lang/rust#146269 (feat(std): emulate flock for solaris via fcntl)
 - rust-lang/rust#146297 (Introduce PlaceContext::may_observe_address.)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index dd492325814..3bb1533c2fe 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1568,12 +1568,11 @@ extern "C" bool LLVMRustPrepareThinLTOImport(const LLVMRustThinLTOData *Data,
   return true;
 }
 
-extern "C" LLVMRustThinLTOBuffer *
-LLVMRustThinLTOBufferCreate(LLVMModuleRef M, bool is_thin, bool emit_summary) {
+extern "C" LLVMRustThinLTOBuffer *LLVMRustThinLTOBufferCreate(LLVMModuleRef M,
+                                                              bool is_thin) {
   auto Ret = std::make_unique<LLVMRustThinLTOBuffer>();
   {
     auto OS = raw_string_ostream(Ret->data);
-    auto ThinLinkOS = raw_string_ostream(Ret->thin_link_data);
     {
       if (is_thin) {
         PassBuilder PB;
@@ -1587,11 +1586,7 @@ LLVMRustThinLTOBufferCreate(LLVMModuleRef M, bool is_thin, bool emit_summary) {
         PB.registerLoopAnalyses(LAM);
         PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
         ModulePassManager MPM;
-        // We only pass ThinLinkOS to be filled in if we want the summary,
-        // because otherwise LLVM does extra work and may double-emit some
-        // errors or warnings.
-        MPM.addPass(
-            ThinLTOBitcodeWriterPass(OS, emit_summary ? &ThinLinkOS : nullptr));
+        MPM.addPass(ThinLTOBitcodeWriterPass(OS, nullptr));
         MPM.run(*unwrap(M), MAM);
       } else {
         WriteBitcodeToFile(*unwrap(M), OS);