Use getValue instead of getAddress in a few MachO only cases.
In MachO the value of the symbol is always the address, so we can use the
simpler function.
llvm-svn: 241364
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 4255ed7..53ea444 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -392,9 +392,7 @@
}
uint64_t MachOObjectFile::getCommonSymbolSizeImpl(DataRefImpl DRI) const {
- uint64_t Value;
- getSymbolAddress(DRI, Value);
- return Value;
+ return getSymbolValue(DRI);
}
SymbolRef::Type MachOObjectFile::getSymbolType(DataRefImpl Symb) const {
@@ -434,8 +432,7 @@
if (MachOType & MachO::N_EXT) {
Result |= SymbolRef::SF_Global;
if ((MachOType & MachO::N_TYPE) == MachO::N_UNDF) {
- uint64_t Value;
- getSymbolAddress(DRI, Value);
+ uint64_t Value = getSymbolValue(DRI);
if (Value && Value != UnknownAddress)
Result |= SymbolRef::SF_Common;
}