[llvm] r255701 - [llvm-objdump/MachODump] Shrink code a little bit. NFC.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 15:14:21 PST 2015


Author: davide
Date: Tue Dec 15 17:14:21 2015
New Revision: 255701

URL: http://llvm.org/viewvc/llvm-project?rev=255701&view=rev
Log:
[llvm-objdump/MachODump] Shrink code a little bit. NFC.

Modified:
    llvm/trunk/tools/llvm-objdump/MachODump.cpp

Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=255701&r1=255700&r2=255701&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Tue Dec 15 17:14:21 2015
@@ -914,10 +914,7 @@ static void DumpInitTermPointerSection(M
                                        SymbolAddressMap *AddrMap,
                                        bool verbose) {
   uint32_t stride;
-  if (O->is64Bit())
-    stride = sizeof(uint64_t);
-  else
-    stride = sizeof(uint32_t);
+  stride = (O->is64Bit()) ? sizeof(uint64_t) : sizeof(uint32_t);
   for (uint32_t i = 0; i < sect_size; i += stride) {
     const char *SymbolName = nullptr;
     if (O->is64Bit()) {




More information about the llvm-commits mailing list