aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-10-20 04:57:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-10-20 04:57:22 +0000
commit02003caf2291ebb2d634e1938553e58e5dd0dce8 (patch)
treee98c7d97dd3d3f5ef1b93432f161d573e2dfd542
parentf10c519249f8565259c8dc6ff315d5090bdf9449 (diff)
downloadexternal_llvm-02003caf2291ebb2d634e1938553e58e5dd0dce8.zip
external_llvm-02003caf2291ebb2d634e1938553e58e5dd0dce8.tar.gz
external_llvm-02003caf2291ebb2d634e1938553e58e5dd0dce8.tar.bz2
Record sysbols created by aliases. Fixes PR8414.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116910 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/lto/LTOModule.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index f0f3dbc..c1f670a 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -469,6 +469,15 @@ void LTOModule::lazyParseSymbols() {
pos = inlineAsm.find(glbl, pend);
}
+ // add aliases
+ for (Module::alias_iterator i = _module->alias_begin(),
+ e = _module->alias_end(); i != e; ++i) {
+ if (i->isDeclaration())
+ addPotentialUndefinedSymbol(i, mangler);
+ else
+ addDefinedDataSymbol(i, mangler);
+ }
+
// make symbols for all undefines
for (StringMap<NameAndAttributes>::iterator it=_undefines.begin();
it != _undefines.end(); ++it) {