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:
@@ -154,13 +154,8 @@ ErrorOr<StringRef> COFFObjectFile::getSymbolName(DataRefImpl Ref) const {
|
||||
return Result;
|
||||
}
|
||||
|
||||
uint64_t COFFObjectFile::getSymbolValue(DataRefImpl Ref) const {
|
||||
COFFSymbolRef Sym = getCOFFSymbol(Ref);
|
||||
|
||||
if (Sym.isAnyUndefined() || Sym.isCommon())
|
||||
return UnknownAddress;
|
||||
|
||||
return Sym.getValue();
|
||||
uint64_t COFFObjectFile::getSymbolValueImpl(DataRefImpl Ref) const {
|
||||
return getCOFFSymbol(Ref).getValue();
|
||||
}
|
||||
|
||||
ErrorOr<uint64_t> COFFObjectFile::getSymbolAddress(DataRefImpl Ref) const {
|
||||
|
||||
Reference in New Issue
Block a user