diff options
author | Kevin Enderby <enderby@apple.com> | 2014-07-01 17:19:10 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2014-07-01 17:19:10 +0000 |
commit | afef4c99dc517c8dc02c1868f421783d4820541c (patch) | |
tree | d1c5a55ae5b15f0b733762c15f488785fbdac74c /llvm/test/Object/size-trivial-macho.test | |
parent | 9be5049a01156db3de69da41e9da1732804e4599 (diff) | |
download | bcm5719-llvm-afef4c99dc517c8dc02c1868f421783d4820541c.tar.gz bcm5719-llvm-afef4c99dc517c8dc02c1868f421783d4820541c.zip |
Add the -arch flag support to llvm-size like what was done to llvm-nm
to select the slice out of a Mach-O universal file. This also includes
support for -arch all, selecting the host architecture by default from
a universal file and checking if -arch is used with a standard Mach-O
it matches that architecture.
llvm-svn: 212108
Diffstat (limited to 'llvm/test/Object/size-trivial-macho.test')
-rw-r--r-- | llvm/test/Object/size-trivial-macho.test | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/llvm/test/Object/size-trivial-macho.test b/llvm/test/Object/size-trivial-macho.test index 1642790c2c7..a6d3d1c4330 100644 --- a/llvm/test/Object/size-trivial-macho.test +++ b/llvm/test/Object/size-trivial-macho.test @@ -10,10 +10,14 @@ RUN: llvm-size -format darwin %p/Inputs/macho-archive-x86_64.a \ RUN: | FileCheck %s -check-prefix mAR RUN: llvm-size -m -x -l %p/Inputs/hello-world.macho-x86_64 \ RUN: | FileCheck %s -check-prefix mxl -RUN: llvm-size %p/Inputs/macho-universal.x86_64.i386 \ +RUN: llvm-size -arch all %p/Inputs/macho-universal.x86_64.i386 \ RUN: | FileCheck %s -check-prefix u -RUN: llvm-size %p/Inputs/macho-universal-archive.x86_64.i386 \ +RUN: llvm-size -arch i386 %p/Inputs/macho-universal.x86_64.i386 \ +RUN: | FileCheck %s -check-prefix u-i386 +RUN: llvm-size -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \ RUN: | FileCheck %s -check-prefix uAR +RUN: llvm-size -arch x86_64 %p/Inputs/macho-universal-archive.x86_64.i386 \ +RUN: | FileCheck %s -check-prefix uAR-x86_64 A: section size addr A: __text 12 0 @@ -74,6 +78,12 @@ u: __TEXT __DATA __OBJC others dec hex u: 4096 0 0 4294971392 4294975488 100002000 {{.*}}/macho-universal.x86_64.i386 (for architecture x86_64) u: 4096 0 0 8192 12288 3000 {{.*}}/macho-universal.x86_64.i386 (for architecture i386) +u-i386: __TEXT __DATA __OBJC others dec hex +u-i386: 4096 0 0 8192 12288 3000 + uAR: __TEXT __DATA __OBJC others dec hex uAR: 136 0 0 32 168 a8 {{.*}}/macho-universal-archive.x86_64.i386(hello.o) (for architecture x86_64) uAR: 5 4 0 0 9 9 {{.*}}/macho-universal-archive.x86_64.i386(foo.o) (for architecture i386) + +uAR-x86_64: __TEXT __DATA __OBJC others dec hex +uAR-x86_64: 136 0 0 32 168 a8 {{.*}}/macho-universal-archive.x86_64.i386(hello.o) |