diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index 5bd25393429..896ac5d3003 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -322,14 +322,14 @@ bool FunctionImporter::importFunctions( continue; auto GUID = GV.getGUID(); if (ImportGUIDs.count(GUID)) { - GV.materialize(); - GlobalsToImport.insert(&GV); // Alias can't point to "available_externally". However when we import - // linkOnceODR the linkage does not change. So we import the aliasee - // only in this case + // linkOnceODR the linkage does not change. So we import the alias + // and aliasee only in this case. const GlobalObject *GO = GV.getBaseObject(); if (!GO->hasLinkOnceODRLinkage()) continue; + GV.materialize(); + GlobalsToImport.insert(&GV); GlobalsToImport.insert(GO); } } |