summaryrefslogtreecommitdiff
path: root/tools/lto/LTOModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto/LTOModule.cpp')
-rw-r--r--tools/lto/LTOModule.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index 9c8baef7d6..c4980d6bf7 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -325,7 +325,7 @@ void LTOModule::addDefinedDataSymbol(GlobalValue* v, Mangler& mangler)
void LTOModule::addDefinedSymbol(GlobalValue* def, Mangler &mangler,
- bool isFunction)
+ bool isFunction)
{
// ignore all llvm.* symbols
if ( strncmp(def->getNameStart(), "llvm.", 5) == 0 )
@@ -401,6 +401,10 @@ void LTOModule::addPotentialUndefinedSymbol(GlobalValue* decl, Mangler &mangler)
if ( strncmp(decl->getNameStart(), "llvm.", 5) == 0 )
return;
+ // ignore all aliases
+ if (isa<GlobalAlias>(decl))
+ return;
+
const char* name = mangler.getValueName(decl).c_str();
// we already have the symbol
@@ -539,4 +543,3 @@ const char* LTOModule::getSymbolName(uint32_t index)
else
return NULL;
}
-