summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-07-07 13:58:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-07-07 13:58:32 +0000
commit05cbccc649f5108d4b28ebc79495e62f82233000 (patch)
tree537bba285df83761b230fb58bebb87945b5bdf82 /llvm/lib/Object
parentb9edcfb0183ae091833143b8ab8c4618e27797df (diff)
downloadbcm5719-llvm-05cbccc649f5108d4b28ebc79495e62f82233000.tar.gz
bcm5719-llvm-05cbccc649f5108d4b28ebc79495e62f82233000.zip
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
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index e9d2c5d8788..ce565313455 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -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;
}
OpenPOWER on IntegriCloud