From 02003caf2291ebb2d634e1938553e58e5dd0dce8 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 20 Oct 2010 04:57:22 +0000 Subject: Record sysbols created by aliases. Fixes PR8414. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116910 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/LTOModule.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools') 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::iterator it=_undefines.begin(); it != _undefines.end(); ++it) { -- cgit v1.1