Fix the problem with llvm-objdump and -archive-headers in printing the archive header...
authorKevin Enderby <enderby@apple.com>
Fri, 23 Jan 2015 21:02:44 +0000 (21:02 +0000)
committerKevin Enderby <enderby@apple.com>
Fri, 23 Jan 2015 21:02:44 +0000 (21:02 +0000)
This problem showed up with the clang-cmake-armv7-a15-full bot.  Thanks to Renato Golin for his help.

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

test/tools/llvm-objdump/X86/macho-archive-headers.test
tools/llvm-objdump/MachODump.cpp

index 45b9cc4d5875805f64d6357154eb2748a117fed8..3d9043e671a45a94da1446f02afba02e40628164 100644 (file)
@@ -3,8 +3,8 @@ RUN: | FileCheck %s
 
 # Note the date as printed by ctime(3) is time zone dependent and not checked.
 CHECK: Archive : {{.*}}/macho-universal-archive.x86_64.i386 (architecture x86_64)
-CHECK: -rw-r--r--124/11 {{.*}} __.SYMDEF SORTED
-CHECK: -rw-r--r--124/0  {{.*}} hello.o
+CHECK: -rw-r--r--124/11     44 {{.*}} __.SYMDEF SORTED
+CHECK: -rw-r--r--124/0     860 {{.*}} hello.o
 CHECK: Archive : {{.*}}/macho-universal-archive.x86_64.i386 (architecture i386)
-CHECK: -rw-r--r--124/11 {{.*}} __.SYMDEF SORTED
-CHECK: -rw-r--r--124/0  {{.*}} foo.o
+CHECK: -rw-r--r--124/11     60 {{.*}} __.SYMDEF SORTED
+CHECK: -rw-r--r--124/0     388 {{.*}} foo.o
index fd7a4f5722c1bf81a29818cdf09c60e5a6c0bd05..67aa6a3c1ad5d786b0b72561c44fbcc28a171c4e 100644 (file)
@@ -749,7 +749,7 @@ static void printArchiveChild(Archive::Child &C, bool verbose,
   unsigned GID = C.getGID();
   outs() << format("%-3d ", GID);
   uint64_t Size = C.getRawSize();
-  outs() << format("%5d ", Size);
+  outs() << format("%5" PRId64, Size) << " ";
 
   StringRef RawLastModified = C.getRawLastModified();
   if (verbose) {