From: Kevin Enderby Date: Fri, 23 Jan 2015 21:02:44 +0000 (+0000) Subject: Fix the problem with llvm-objdump and -archive-headers in printing the archive header... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f9857eb016b5ec40f703084c425140a78f622de1;p=oota-llvm.git Fix the problem with llvm-objdump and -archive-headers in printing the archive header size field. 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 --- diff --git a/test/tools/llvm-objdump/X86/macho-archive-headers.test b/test/tools/llvm-objdump/X86/macho-archive-headers.test index 45b9cc4d587..3d9043e671a 100644 --- a/test/tools/llvm-objdump/X86/macho-archive-headers.test +++ b/test/tools/llvm-objdump/X86/macho-archive-headers.test @@ -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 diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index fd7a4f5722c..67aa6a3c1ad 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -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) {