[llvm-objdump/MachODump] Shrink code a little bit. NFC.
authorDavide Italiano <davide@freebsd.org>
Tue, 15 Dec 2015 23:14:21 +0000 (23:14 +0000)
committerDavide Italiano <davide@freebsd.org>
Tue, 15 Dec 2015 23:14:21 +0000 (23:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255701 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/MachODump.cpp

index 65de70c..defd2d4 100644 (file)
@@ -914,10 +914,7 @@ static void DumpInitTermPointerSection(MachOObjectFile *O, const char *sect,
                                        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()) {