mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-21 19:36:59 +00:00
Add alias with non-external aliasee to the list of exported symbols of the library.
llvm-svn: 47899
This commit is contained in:
parent
1e76b493c7
commit
86514cffba
@ -198,11 +198,20 @@ static void getSymbols(Module*M, std::vector<std::string>& symbols) {
|
||||
if (!GI->getName().empty())
|
||||
symbols.push_back(GI->getName());
|
||||
|
||||
// Loop over functions.
|
||||
// Loop over functions
|
||||
for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI)
|
||||
if (!FI->isDeclaration() && !FI->hasInternalLinkage())
|
||||
if (!FI->getName().empty())
|
||||
symbols.push_back(FI->getName());
|
||||
|
||||
// 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());
|
||||
}
|
||||
}
|
||||
|
||||
// Get just the externally visible defined symbols from the bitcode
|
||||
|
Loading…
x
Reference in New Issue
Block a user