[llvm] r241584 - Simplify, NFC.

Rafael Espindola rafael.espindola at gmail.com
Tue Jul 7 06:58:33 PDT 2015


Author: rafael
Date: Tue Jul  7 08:58:32 2015
New Revision: 241584

URL: http://llvm.org/viewvc/llvm-project?rev=241584&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Object/MachOObjectFile.cpp

Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=241584&r1=241583&r2=241584&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Tue Jul  7 08:58:32 2015
@@ -390,7 +390,7 @@ uint32_t MachOObjectFile::getSymbolAlign
 }
 
 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
   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;
     }
 





More information about the llvm-commits mailing list