mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Rollup merge of #46652 - ishitatsuyuki:thinlto-backport, r=alexcrichton
ThinLTO: updates for LLVM 5 refs:ccb80b9c0f
e611018a3f
This commit is contained in:
commit
6e95629812
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user