From 0661b93de9b2fd2586197ec1c69424386db71722 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 9 Jul 2009 06:03:04 +0000 Subject: [PATCH] Don't create undefined symbols for aliases. llvm-svn: 75111 --- llvm/tools/lto/LTOModule.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm/tools/lto/LTOModule.cpp b/llvm/tools/lto/LTOModule.cpp index 9c8baef7d6a9..c4980d6bf79b 100644 --- a/llvm/tools/lto/LTOModule.cpp +++ b/llvm/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(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; } -