mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
llvm-nm must print the alias symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37766 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1ceda1d63e
commit
4a828eeed3
@ -68,14 +68,19 @@ namespace {
|
||||
}
|
||||
|
||||
static char TypeCharForSymbol(GlobalValue &GV) {
|
||||
if (GV.isDeclaration()) return 'U';
|
||||
if (GV.isDeclaration()) return 'U';
|
||||
if (GV.hasLinkOnceLinkage()) return 'C';
|
||||
if (GV.hasWeakLinkage()) return 'W';
|
||||
if (isa<Function>(GV) && GV.hasInternalLinkage()) return 't';
|
||||
if (isa<Function>(GV) && GV.hasInternalLinkage()) return 't';
|
||||
if (isa<Function>(GV)) return 'T';
|
||||
if (isa<GlobalVariable>(GV) && GV.hasInternalLinkage()) return 'd';
|
||||
if (isa<GlobalVariable>(GV) && GV.hasInternalLinkage()) return 'd';
|
||||
if (isa<GlobalVariable>(GV)) return 'D';
|
||||
return '?';
|
||||
if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(&GV)) {
|
||||
const GlobalValue *AliasedGV = GA->getAliasedGlobal();
|
||||
if (isa<Function>(AliasedGV)) return 'T';
|
||||
if (isa<GlobalVariable>(AliasedGV)) return 'D';
|
||||
}
|
||||
return '?';
|
||||
}
|
||||
|
||||
static void DumpSymbolNameForGlobalValue(GlobalValue &GV) {
|
||||
@ -115,7 +120,10 @@ static void DumpSymbolNamesFromModule(Module *M) {
|
||||
<< " Size Line Section\n";
|
||||
}
|
||||
std::for_each (M->begin (), M->end (), DumpSymbolNameForGlobalValue);
|
||||
std::for_each (M->global_begin (), M->global_end (), DumpSymbolNameForGlobalValue);
|
||||
std::for_each (M->global_begin (), M->global_end (),
|
||||
DumpSymbolNameForGlobalValue);
|
||||
std::for_each (M->alias_begin (), M->alias_end (),
|
||||
DumpSymbolNameForGlobalValue);
|
||||
}
|
||||
|
||||
static void DumpSymbolNamesFromFile(std::string &Filename) {
|
||||
|
Loading…
Reference in New Issue
Block a user