about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorAugie Fackler <augie@google.com>2021-03-16 16:45:21 -0400
committerAugie Fackler <augie@google.com>2021-03-16 16:45:21 -0400
commitaf954847784a86463af9f3739c20310205c01b69 (patch)
treeab462a5860e1ec77b9904b1d35c89840f82f6aaf /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent1d6754d6eb1ac349477760a2afcd51cf75ac1a1c (diff)
downloadrust-af954847784a86463af9f3739c20310205c01b69.tar.gz
rust-af954847784a86463af9f3739c20310205c01b69.zip
llvm-wrapper: adapt to function signature change of thinLTOResolvePrevailingInIndex
This changed in 54fb3ca96e261f7107cb1b5778c34cb0e0808be6 - I'm not
entirely sure it's correct that we're leaving config empty, but the one
case in LLVM that looked similar did that.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 51c80cf7dfa..eaccbfd6373 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1437,9 +1437,14 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
     Ret->ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
   };
 
+#if LLVM_VERSION_GE(12,0)
+  lto::Config conf;
+  thinLTOResolvePrevailingInIndex(conf, Ret->Index, isPrevailing, recordNewLinkage,
+                                  Ret->GUIDPreservedSymbols);
+#else
   thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage,
                                   Ret->GUIDPreservedSymbols);
-
+#endif
   // Here we calculate an `ExportedGUIDs` set for use in the `isExported`
   // callback below. This callback below will dictate the linkage for all
   // summaries in the index, and we basically just only want to ensure that dead