Don't create undefined symbols for aliases.

llvm-svn: 75111
This commit is contained in:
Nick Lewycky 2009-07-09 06:03:04 +00:00
parent 3ffd238f1c
commit 0661b93de9
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}