diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2017-12-15 09:26:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-15 09:26:57 -0500 |
| commit | 6e956298129ccc17c0742acdbb9d3fc57f647203 (patch) | |
| tree | 5e8f2a30e70497e61147d4ac96005f84acd64786 | |
| parent | ba67acc0e743e45fe6e42387d2e6c5d97667bd48 (diff) | |
| parent | dffa36c0052d9758f8f28d35d62ab3fdca4e53cc (diff) | |
| download | rust-6e956298129ccc17c0742acdbb9d3fc57f647203.tar.gz rust-6e956298129ccc17c0742acdbb9d3fc57f647203.zip | |
Rollup merge of #46652 - ishitatsuyuki:thinlto-backport, r=alexcrichton
ThinLTO: updates for LLVM 5 refs: https://github.com/llvm-mirror/llvm/commit/ccb80b9c0f60f33780e5e29bf66a87bb56968b99 https://github.com/llvm-mirror/llvm/commit/e611018a3f1237c9328763027db4a616ed7be04a
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 072a9144f17..e0a14f9b14f 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -969,11 +969,19 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, // linkage will stay as external, and internal will stay as internal. std::set<GlobalValue::GUID> ExportedGUIDs; for (auto &List : Ret->Index) { +#if LLVM_VERSION_GE(5, 0) + for (auto &GVS: List.second.SummaryList) { +#else for (auto &GVS: List.second) { +#endif if (GlobalValue::isLocalLinkage(GVS->linkage())) continue; auto GUID = GVS->getOriginalName(); +#if LLVM_VERSION_GE(5, 0) + if (GVS->flags().Live) +#else if (!DeadSymbols.count(GUID)) +#endif ExportedGUIDs.insert(GUID); } } |
