Skip to content

Commit

Permalink
Auto merge of #55835 - alexcrichton:llvm-upgrade, r=<try>
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
bors committed Nov 10, 2018
2 parents 36a50c2 + 67053e5 commit 27f6007
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libcompiler_builtins
5 changes: 5 additions & 0 deletions src/librustc_codegen_utils/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,11 @@ impl<'a> Linker for WasmLd<'a> {
// indicative of bugs, let's prevent them.
self.cmd.arg("--fatal-warnings");

// LLD only implements C++-like demangling, which doesn't match our own
// mangling scheme. Tell LLD to not demangle anything and leave it up to
// us to demangle these symbols later.
self.cmd.arg("--no-demangle");

let mut cmd = Command::new("");
::std::mem::swap(&mut cmd, &mut self.cmd);
cmd
Expand Down
2 changes: 1 addition & 1 deletion src/llvm
Submodule llvm updated 4618 files
8 changes: 8 additions & 0 deletions src/rustllvm/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,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
Expand Down Expand Up @@ -1016,7 +1020,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;
}

Expand Down
6 changes: 5 additions & 1 deletion src/rustllvm/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,11 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
unwrapDI<DIDescriptor>(Context), Name, LinkageName,
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), IsLocalToUnit,
InitExpr, unwrapDIPtr<MDNode>(Decl), AlignInBits);
InitExpr, unwrapDIPtr<MDNode>(Decl),
#if LLVM_VERSION_GE(8, 0)
/* templateParams */ nullptr,
#endif
AlignInBits);

InitVal->setMetadata("dbg", VarExpr);

Expand Down
2 changes: 1 addition & 1 deletion src/tools/lld
Submodule lld updated 372 files

0 comments on commit 27f6007

Please sign in to comment.