[llvm] r225417 - Run clang-format on tools/llvm-objdump/MachODump.cpp again as some of my

Kevin Enderby enderby at apple.com
Wed Jan 7 16:25:25 PST 2015


Author: enderby
Date: Wed Jan  7 18:25:24 2015
New Revision: 225417

URL: http://llvm.org/viewvc/llvm-project?rev=225417&view=rev
Log:
Run clang-format on tools/llvm-objdump/MachODump.cpp again as some of my
previous changes got in with incorrect formatting. No functional change.

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=225417&r1=225416&r2=225417&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Wed Jan  7 18:25:24 2015
@@ -3560,8 +3560,7 @@ static void PrintUuidLoadCommand(MachO::
   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(M
 }
 
 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(Mac
     }
   }
   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(Mach
 }
 
 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(Mach
   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(Mach
   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::th
       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::th
       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::th
                    << " (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::th
           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::th
           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::th
       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::th
       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::th
     }
   }
 }
- 
+
 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 Mach
       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);





More information about the llvm-commits mailing list