Delete UnknownAddress. It is a perfectly valid symbol value.
getSymbolValue now returns a value that in convenient for most callers: * 0 for undefined * symbol size for common symbols * offset/address for symbols the rest Code that needs something more specific can check getSymbolFlags. llvm-svn: 241605
This commit is contained in:
@@ -825,8 +825,6 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
if (error(AddressOrErr.getError()))
|
||||
break;
|
||||
uint64_t Address = *AddressOrErr;
|
||||
if (Address == UnknownAddress)
|
||||
continue;
|
||||
Address -= SectionAddr;
|
||||
if (Address >= SectSize)
|
||||
continue;
|
||||
@@ -1136,11 +1134,6 @@ void llvm::PrintSymbolTable(const ObjectFile *o) {
|
||||
bool Common = Flags & SymbolRef::SF_Common;
|
||||
bool Hidden = Flags & SymbolRef::SF_Hidden;
|
||||
|
||||
if (Common)
|
||||
Address = Symbol.getCommonSize();
|
||||
|
||||
if (Address == UnknownAddress)
|
||||
Address = 0;
|
||||
char GlobLoc = ' ';
|
||||
if (Type != SymbolRef::ST_Unknown)
|
||||
GlobLoc = Global ? 'g' : 'l';
|
||||
|
||||
Reference in New Issue
Block a user