[llvm] r258837 - [llvm-nm] Simplify. No functional changes intended.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 11:28:52 PST 2016


Author: davide
Date: Tue Jan 26 13:28:51 2016
New Revision: 258837

URL: http://llvm.org/viewvc/llvm-project?rev=258837&view=rev
Log:
[llvm-nm] Simplify. No functional changes intended.

Modified:
    llvm/trunk/tools/llvm-nm/llvm-nm.cpp

Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=258837&r1=258836&r2=258837&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Tue Jan 26 13:28:51 2016
@@ -788,12 +788,11 @@ static char getSymbolNMTypeChar(MachOObj
     StringRef SegmentName = Obj.getSectionFinalSegmentName(Ref);
     if (SegmentName == "__TEXT" && SectionName == "__text")
       return 't';
-    else if (SegmentName == "__DATA" && SectionName == "__data")
+    if (SegmentName == "__DATA" && SectionName == "__data")
       return 'd';
-    else if (SegmentName == "__DATA" && SectionName == "__bss")
+    if (SegmentName == "__DATA" && SectionName == "__bss")
       return 'b';
-    else
-      return 's';
+    return 's';
   }
   }
 




More information about the llvm-commits mailing list