Simplify getSymbolType.

This is still a really odd function. Most calls are in object format specific
contexts and should probably be replaced with a more direct query, but at least
now this is not too obnoxious to use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-26 12:18:49 +00:00
parent 5511d97506
commit 50bea40e8e
14 changed files with 54 additions and 103 deletions

View File

@@ -1078,13 +1078,11 @@ void llvm::PrintSymbolTable(const ObjectFile *o) {
}
for (const SymbolRef &Symbol : o->symbols()) {
uint64_t Address;
SymbolRef::Type Type;
SymbolRef::Type Type = Symbol.getType();
uint32_t Flags = Symbol.getFlags();
section_iterator Section = o->section_end();
if (error(Symbol.getAddress(Address)))
continue;
if (error(Symbol.getType(Type)))
continue;
if (error(Symbol.getSection(Section)))
continue;
StringRef Name;