about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-26 12:14:13 +0000
committerbors <bors@rust-lang.org>2018-11-26 12:14:13 +0000
commit6bfb46e4ac9a2704f06de1a2ff7a4612cd70c8cb (patch)
treeb41fb59406c53b5d9a249b41541946285a3f7ef1 /src/rustllvm/PassWrapper.cpp
parentb51632e3f0856ea444f5e59819538e85947673fc (diff)
parent7215963e56321c5e92b9c2f7c4ad788362451b37 (diff)
downloadrust-6bfb46e4ac9a2704f06de1a2ff7a4612cd70c8cb.tar.gz
rust-6bfb46e4ac9a2704f06de1a2ff7a4612cd70c8cb.zip
Auto merge of #55835 - alexcrichton:llvm-upgrade, r=nikomatsakis
Upgrade LLVM to trunk, still version 8

This commit upgrades the LLVM/LLD/compiler-rt submodules used to the current trunk versions in upstream. Some activity has happened on the wasm SIMD side of things as well as LLD which we'd like to pick up!
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
-rw-r--r--src/rustllvm/PassWrapper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 3b0046222a9..06de0d6509b 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -922,7 +922,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
                               GlobalValue::LinkageTypes NewLinkage) {
     ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
   };
+#if LLVM_VERSION_GE(8, 0)
+  thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
+#else
   thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);
+#endif
 
   // Here we calculate an `ExportedGUIDs` set for use in the `isExported`
   // callback below. This callback below will dictate the linkage for all
@@ -977,7 +981,11 @@ extern "C" bool
 LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
   Module &Mod = *unwrap(M);
   const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
+#if LLVM_VERSION_GE(8, 0)
+  thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
+#else
   thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
+#endif
   return true;
 }