about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-29 09:45:26 +0000
committerbors <bors@rust-lang.org>2023-03-29 09:45:26 +0000
commitcf32b9de1e8f66526c36ad2927458558d2e81093 (patch)
treed2791bbd10641fa720e0cff4ef053e74d519e3bb /compiler/rustc_llvm/llvm-wrapper
parentf346fb0bc655acf72e71f1f16065c271447bdbd9 (diff)
parent14157561fb6ac5937deb1de37eb9cb6fb8cd802f (diff)
downloadrust-cf32b9de1e8f66526c36ad2927458558d2e81093.tar.gz
rust-cf32b9de1e8f66526c36ad2927458558d2e81093.zip
Auto merge of #109720 - Dylan-DPC:rollup-u564m8s, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #108335 (rustdoc + rustdoc-json support for `feature(non_lifetime_binders)`)
 - #109534 (rustdoc: Unsupport importing `doc(primitive)` and `doc(keyword)` modules)
 - #109659 (llvm-wrapper: adapt for LLVM API change)
 - #109664 (Use span of placeholders in format_args!() expansion.)
 - #109683 (Check for overflow in `assemble_candidates_after_normalizing_self_ty`)
 - #109713 (Fix mismatched punctuation in Debug impl of AttrId)
 - #109718 (Rename `IndexVec::last` → `last_index`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 329e7329b11..736766e35bc 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1163,13 +1163,6 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
   // Otherwise, we sometimes lose `static` values -- see #60184.
   computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols,
                                   deadIsPrevailing, /* ImportEnabled = */ false);
-  ComputeCrossModuleImport(
-    Ret->Index,
-    Ret->ModuleToDefinedGVSummaries,
-    Ret->ImportLists,
-    Ret->ExportLists
-  );
-
   // Resolve LinkOnce/Weak symbols, this has to be computed early be cause it
   // impacts the caching.
   //
@@ -1186,6 +1179,16 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
       return true;
     return Prevailing->second == S;
   };
+  ComputeCrossModuleImport(
+    Ret->Index,
+    Ret->ModuleToDefinedGVSummaries,
+#if LLVM_VERSION_GE(17, 0)
+    isPrevailing,
+#endif
+    Ret->ImportLists,
+    Ret->ExportLists
+  );
+
   auto recordNewLinkage = [&](StringRef ModuleIdentifier,
                               GlobalValue::GUID GUID,
                               GlobalValue::LinkageTypes NewLinkage) {