diff options
| author | bors <bors@rust-lang.org> | 2019-01-26 02:10:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-26 02:10:15 +0000 |
| commit | 9df043b543bb9bc3e50bc243811c58d52a3aefea (patch) | |
| tree | cf74ee097b45d0416476ba5726b0feda76de9985 /src/rustllvm/PassWrapper.cpp | |
| parent | 37d51aa8f3bca674a50eb7c6204deed6fb4dff80 (diff) | |
| parent | 059ed4f21f42914028af5fc0083d3eca13a49d6f (diff) | |
| download | rust-9df043b543bb9bc3e50bc243811c58d52a3aefea.tar.gz rust-9df043b543bb9bc3e50bc243811c58d52a3aefea.zip | |
Auto merge of #57675 - cuviper:llvm-monorepo, r=alexcrichton
Rebase to the llvm-project monorepo
The new git submodule src/llvm-project is a monorepo replacing src/llvm
and src/tools/{clang,lld,lldb}. This also serves as a rebase for these
projects to the new 8.x branch from trunk.
The src/llvm-emscripten fork is unchanged for now.
r? @alexcrichton
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index df7a81643bc..18d277be21a 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -789,7 +789,7 @@ struct LLVMRustThinLTOData { StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries; #if LLVM_VERSION_GE(7, 0) - LLVMRustThinLTOData() : Index(/* isPerformingAnalysis = */ false) {} + LLVMRustThinLTOData() : Index(/* HaveGVs = */ false) {} #endif }; @@ -865,7 +865,12 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, auto deadIsPrevailing = [&](GlobalValue::GUID G) { return PrevailingType::Unknown; }; +#if LLVM_VERSION_GE(8, 0) + computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols, + deadIsPrevailing, /* ImportEnabled = */ true); +#else computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing); +#endif #else computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols); #endif |
