Skip to content

Commit dffa36c

Browse files
committed
ThinLTO: updates for LLVM 5
refs: llvm-mirror/llvm@ccb80b9 llvm-mirror/llvm@e611018
1 parent 830599b commit dffa36c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rustllvm/PassWrapper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,19 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
969969
// linkage will stay as external, and internal will stay as internal.
970970
std::set<GlobalValue::GUID> ExportedGUIDs;
971971
for (auto &List : Ret->Index) {
972+
#if LLVM_VERSION_GE(5, 0)
973+
for (auto &GVS: List.second.SummaryList) {
974+
#else
972975
for (auto &GVS: List.second) {
976+
#endif
973977
if (GlobalValue::isLocalLinkage(GVS->linkage()))
974978
continue;
975979
auto GUID = GVS->getOriginalName();
980+
#if LLVM_VERSION_GE(5, 0)
981+
if (GVS->flags().Live)
982+
#else
976983
if (!DeadSymbols.count(GUID))
984+
#endif
977985
ExportedGUIDs.insert(GUID);
978986
}
979987
}

0 commit comments

Comments
 (0)