In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags.

llvm-svn: 151670
This commit is contained in:
David Meyer
2012-02-28 23:47:53 +00:00
parent fcbfdee5df
commit 1df4b84db4
9 changed files with 78 additions and 156 deletions

View File

@@ -482,21 +482,21 @@ static void PrintSymbolTable(const ObjectFile *o) {
if (error(ec)) return;
StringRef Name;
uint64_t Address;
bool Global;
SymbolRef::Type Type;
bool Weak;
bool Absolute;
uint64_t Size;
uint32_t Flags;
section_iterator Section = o->end_sections();
if (error(si->getName(Name))) continue;
if (error(si->getAddress(Address))) continue;
if (error(si->isGlobal(Global))) continue;
if (error(si->getFlags(Flags))) continue;
if (error(si->getType(Type))) continue;
if (error(si->isWeak(Weak))) continue;
if (error(si->isAbsolute(Absolute))) continue;
if (error(si->getSize(Size))) continue;
if (error(si->getSection(Section))) continue;
bool Global = Flags & SymbolRef::SF_Global;
bool Weak = Flags & SymbolRef::SF_Weak;
bool Absolute = Flags & SymbolRef::SF_Absolute;
if (Address == UnknownAddressOrSize)
Address = 0;
if (Size == UnknownAddressOrSize)