mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-21 21:11:36 +00:00
Fix thinko: alias always defines new symbol. Even is aliasee itself is undefined.
llvm-svn: 48203
This commit is contained in:
parent
1a65335a9b
commit
da7746cf43
@ -207,10 +207,8 @@ static void getSymbols(Module*M, std::vector<std::string>& symbols) {
|
||||
// Loop over aliases
|
||||
for (Module::alias_iterator AI = M->alias_begin(), AE = M->alias_end();
|
||||
AI != AE; ++AI) {
|
||||
const GlobalValue *Aliased = AI->getAliasedGlobal();
|
||||
if (!Aliased->isDeclaration())
|
||||
if (AI->hasName())
|
||||
symbols.push_back(AI->getName());
|
||||
if (AI->hasName())
|
||||
symbols.push_back(AI->getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,13 +71,8 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
|
||||
|
||||
for (Module::alias_iterator I = M->alias_begin(), E = M->alias_end();
|
||||
I != E; ++I)
|
||||
if (I->hasName()) {
|
||||
const GlobalValue *Aliased = I->getAliasedGlobal();
|
||||
if (Aliased->isDeclaration())
|
||||
UndefinedSymbols.insert(I->getName());
|
||||
else
|
||||
DefinedSymbols.insert(I->getName());
|
||||
}
|
||||
if (I->hasName())
|
||||
DefinedSymbols.insert(I->getName());
|
||||
|
||||
// Prune out any defined symbols from the undefined symbols set...
|
||||
for (std::set<std::string>::iterator I = UndefinedSymbols.begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user