Simplify, NFC.

In these two contexts we really just want the raw n_value. No need to use
getSymbolValue which checks for special cases where, semantically, the symbol
has no value.

llvm-svn: 241584
This commit is contained in:
Rafael Espindola 2015-07-07 13:58:32 +00:00
parent b9edcfb018
commit 05cbccc649
1 changed files with 2 additions and 3 deletions

View File

@ -390,7 +390,7 @@ uint32_t MachOObjectFile::getSymbolAlignment(DataRefImpl DRI) const {
}
uint64_t MachOObjectFile::getCommonSymbolSizeImpl(DataRefImpl DRI) const {
return getSymbolValue(DRI);
return getNValue(DRI);
}
SymbolRef::Type MachOObjectFile::getSymbolType(DataRefImpl Symb) const {
@ -430,8 +430,7 @@ uint32_t MachOObjectFile::getSymbolFlags(DataRefImpl DRI) const {
if (MachOType & MachO::N_EXT) {
Result |= SymbolRef::SF_Global;
if ((MachOType & MachO::N_TYPE) == MachO::N_UNDF) {
uint64_t Value = getSymbolValue(DRI);
if (Value && Value != UnknownAddress)
if (getNValue(DRI))
Result |= SymbolRef::SF_Common;
}