diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-07-09 06:03:04 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-07-09 06:03:04 +0000 |
commit | b87a49251de4ff3686513b4ac1dbe084f56e7ec8 (patch) | |
tree | dcf5f9def26fe65a9506868ca114b90f317aa986 /tools/lto/LTOModule.cpp | |
parent | ebcb92425fdca947874c0c506b71d80a4cd1cfbd (diff) | |
download | external_llvm-b87a49251de4ff3686513b4ac1dbe084f56e7ec8.zip external_llvm-b87a49251de4ff3686513b4ac1dbe084f56e7ec8.tar.gz external_llvm-b87a49251de4ff3686513b4ac1dbe084f56e7ec8.tar.bz2 |
Don't create undefined symbols for aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOModule.cpp')
-rw-r--r-- | tools/lto/LTOModule.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 9c8baef..c4980d6 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; } - |