Run clang-format on tools/llvm-objdump/MachODump.cpp again as some of my
authorKevin Enderby <enderby@apple.com>
Thu, 8 Jan 2015 00:25:24 +0000 (00:25 +0000)
committerKevin Enderby <enderby@apple.com>
Thu, 8 Jan 2015 00:25:24 +0000 (00:25 +0000)
previous changes got in with incorrect formatting. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225417 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/MachODump.cpp

index 68f46a72cae22914e27b630222b4c564ebcbeffb..afb8d4bf66af4c8b34793cd62b7db3c184815385 100644 (file)
@@ -3560,8 +3560,7 @@ static void PrintUuidLoadCommand(MachO::uuid_command uuid) {
   outs() << "\n";
 }
 
-static void PrintRpathLoadCommand(MachO::rpath_command rpath,
-                                  const char *Ptr) {
+static void PrintRpathLoadCommand(MachO::rpath_command rpath, const char *Ptr) {
   outs() << "          cmd LC_RPATH\n";
   outs() << "      cmdsize " << rpath.cmdsize;
   if (rpath.cmdsize < sizeof(struct MachO::rpath_command))
@@ -3659,7 +3658,7 @@ static void PrintEncryptionInfoCommand(MachO::encryption_info_command ec,
 }
 
 static void PrintEncryptionInfoCommand64(MachO::encryption_info_command_64 ec,
-                                       uint32_t object_size) {
+                                         uint32_t object_size) {
   outs() << "          cmd LC_ENCRYPTION_INFO_64\n";
   outs() << "      cmdsize " << ec.cmdsize;
   if (ec.cmdsize != sizeof(struct MachO::encryption_info_command_64))
@@ -3707,8 +3706,8 @@ static void PrintLinkerOptionCommand(MachO::linker_option_command lo,
     }
   }
   if (lo.count != i)
-    outs() << "   count " << lo.count  << " does not match number of strings " << i
-           << "\n";
+    outs() << "   count " << lo.count << " does not match number of strings "
+           << i << "\n";
 }
 
 static void PrintSubFrameworkCommand(MachO::sub_framework_command sub,
@@ -3744,7 +3743,7 @@ static void PrintSubUmbrellaCommand(MachO::sub_umbrella_command sub,
 }
 
 static void PrintSubLibraryCommand(MachO::sub_library_command sub,
-                                    const char *Ptr) {
+                                   const char *Ptr) {
   outs() << "          cmd LC_SUB_LIBRARY\n";
   outs() << "      cmdsize " << sub.cmdsize;
   if (sub.cmdsize < sizeof(struct MachO::sub_library_command))
@@ -3879,7 +3878,7 @@ static void Print_x86_float_state_t(MachO::x86_float_state64_t &fpu) {
   else if (fpu.fpu_fcw.rc == MachO::x86_FP_RND_UP)
     outs() << "FP_RND_UP ";
   else if (fpu.fpu_fcw.rc == MachO::x86_FP_CHOP)
-     outs() << "FP_CHOP ";
+    outs() << "FP_CHOP ";
   outs() << "\n";
   outs() << "\t    status: invalid " << fpu.fpu_fsw.invalid;
   outs() << " denorm " << fpu.fpu_fsw.denorm;
@@ -3959,7 +3958,7 @@ static void Print_x86_float_state_t(MachO::x86_float_state64_t &fpu) {
   for (uint32_t f = 0; f < 6; f++) {
     outs() << "\t            ";
     for (uint32_t g = 0; g < 16; g++)
-      outs() <<  format("%02" PRIx32, fpu.fpu_rsrv4[f*g]) << " ";
+      outs() << format("%02" PRIx32, fpu.fpu_rsrv4[f * g]) << " ";
     outs() << "\n";
   }
   outs() << "\t    fpu_reserved1 " << format("0x%08" PRIx32, fpu.fpu_reserved1);
@@ -3994,7 +3993,7 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
       if (end - begin > (ptrdiff_t)sizeof(uint32_t)) {
         memcpy((char *)&flavor, begin, sizeof(uint32_t));
         begin += sizeof(uint32_t);
-      } else{
+      } else {
         flavor = 0;
         begin = end;
       }
@@ -4003,7 +4002,7 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
       if (end - begin > (ptrdiff_t)sizeof(uint32_t)) {
         memcpy((char *)&count, begin, sizeof(uint32_t));
         begin += sizeof(uint32_t);
-      } else{
+      } else {
         count = 0;
         begin = end;
       }
@@ -4057,16 +4056,15 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
                    << " (not x86_THREAD_STATE64_COUNT\n";
           Print_x86_thread_state64_t(ts.uts.ts64);
         } else {
-          outs() << "\t    tsh.flavor " << ts.tsh.flavor
-                 << "  tsh.count " << ts.tsh.count << "\n";
+          outs() << "\t    tsh.flavor " << ts.tsh.flavor << "  tsh.count "
+                 << ts.tsh.count << "\n";
         }
       } else if (flavor == MachO::x86_FLOAT_STATE) {
         outs() << "     flavor x86_FLOAT_STATE\n";
         if (count == MachO::x86_FLOAT_STATE_COUNT)
           outs() << "      count x86_FLOAT_STATE_COUNT\n";
         else
-          outs() << "      count " << count
-                 << " (not x86_FLOAT_STATE_COUNT)\n";
+          outs() << "      count " << count << " (not x86_FLOAT_STATE_COUNT)\n";
         struct MachO::x86_float_state_t fs;
         left = end - begin;
         if (left >= sizeof(MachO::x86_float_state_t)) {
@@ -4081,22 +4079,22 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
           swapStruct(fs);
         if (fs.fsh.flavor == MachO::x86_FLOAT_STATE64) {
           outs() << "\t    fsh.flavor x86_FLOAT_STATE64 ";
-         if (fs.fsh.count == MachO::x86_FLOAT_STATE64_COUNT)
+          if (fs.fsh.count == MachO::x86_FLOAT_STATE64_COUNT)
             outs() << "fsh.count x86_FLOAT_STATE64_COUNT\n";
           else
             outs() << "fsh.count " << fs.fsh.count
                    << " (not x86_FLOAT_STATE64_COUNT\n";
           Print_x86_float_state_t(fs.ufs.fs64);
         } else {
-          outs() << "\t    fsh.flavor " << fs.fsh.flavor
-                 << "  fsh.count " << fs.fsh.count << "\n";
+          outs() << "\t    fsh.flavor " << fs.fsh.flavor << "  fsh.count "
+                 << fs.fsh.count << "\n";
         }
       } else if (flavor == MachO::x86_EXCEPTION_STATE) {
         outs() << "     flavor x86_EXCEPTION_STATE\n";
         if (count == MachO::x86_EXCEPTION_STATE_COUNT)
           outs() << "      count x86_EXCEPTION_STATE_COUNT\n";
         else
-           outs() << "      count " << count
+          outs() << "      count " << count
                  << " (not x86_EXCEPTION_STATE_COUNT)\n";
         struct MachO::x86_exception_state_t es;
         left = end - begin;
@@ -4112,15 +4110,15 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
           swapStruct(es);
         if (es.esh.flavor == MachO::x86_EXCEPTION_STATE64) {
           outs() << "\t    esh.flavor x86_EXCEPTION_STATE64\n";
-         if (es.esh.count == MachO::x86_EXCEPTION_STATE64_COUNT)
+          if (es.esh.count == MachO::x86_EXCEPTION_STATE64_COUNT)
             outs() << "\t    esh.count x86_EXCEPTION_STATE64_COUNT\n";
           else
             outs() << "\t    esh.count " << es.esh.count
                    << " (not x86_EXCEPTION_STATE64_COUNT\n";
           Print_x86_exception_state_t(es.ues.es64);
         } else {
-          outs() << "\t    esh.flavor " << es.esh.flavor
-                 << "  esh.count " << es.esh.count << "\n";
+          outs() << "\t    esh.flavor " << es.esh.flavor << "  esh.count "
+                 << es.esh.count << "\n";
         }
       } else {
         outs() << "     flavor " << flavor << " (unknown)\n";
@@ -4134,7 +4132,7 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
       if (end - begin > (ptrdiff_t)sizeof(uint32_t)) {
         memcpy((char *)&flavor, begin, sizeof(uint32_t));
         begin += sizeof(uint32_t);
-      } else{
+      } else {
         flavor = 0;
         begin = end;
       }
@@ -4143,7 +4141,7 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
       if (end - begin > (ptrdiff_t)sizeof(uint32_t)) {
         memcpy((char *)&count, begin, sizeof(uint32_t));
         begin += sizeof(uint32_t);
-      } else{
+      } else {
         count = 0;
         begin = end;
       }
@@ -4156,7 +4154,7 @@ static void PrintThreadCommand(MachO::thread_command t, const char *Ptr,
     }
   }
 }
+
 static void PrintDylibCommand(MachO::dylib_command dl, const char *Ptr) {
   if (dl.cmd == MachO::LC_ID_DYLIB)
     outs() << "          cmd LC_ID_DYLIB\n";
@@ -4307,13 +4305,16 @@ static void PrintLoadCommands(const MachOObjectFile *Obj, uint32_t ncmds,
       MachO::entry_point_command Ep = Obj->getEntryPointCommand(Command);
       PrintEntryPointCommand(Ep);
     } else if (Command.C.cmd == MachO::LC_ENCRYPTION_INFO) {
-      MachO::encryption_info_command Ei = Obj->getEncryptionInfoCommand(Command);
+      MachO::encryption_info_command Ei =
+          Obj->getEncryptionInfoCommand(Command);
       PrintEncryptionInfoCommand(Ei, Buf.size());
     } else if (Command.C.cmd == MachO::LC_ENCRYPTION_INFO_64) {
-      MachO::encryption_info_command_64 Ei = Obj->getEncryptionInfoCommand64(Command);
+      MachO::encryption_info_command_64 Ei =
+          Obj->getEncryptionInfoCommand64(Command);
       PrintEncryptionInfoCommand64(Ei, Buf.size());
     } else if (Command.C.cmd == MachO::LC_LINKER_OPTION) {
-      MachO::linker_option_command Lo = Obj->getLinkerOptionLoadCommand(Command);
+      MachO::linker_option_command Lo =
+          Obj->getLinkerOptionLoadCommand(Command);
       PrintLinkerOptionCommand(Lo, Command.Ptr);
     } else if (Command.C.cmd == MachO::LC_SUB_FRAMEWORK) {
       MachO::sub_framework_command Sf = Obj->getSubFrameworkCommand(Command);