1 ## Check how llvm-dwarfdump calculates section sizes
2 ## with --show-section-sizes on a fat binary.
4 # RUN: yaml2obj %p/Inputs/i386_macho_with_debug.yaml -o %t-i386.o
5 # RUN: yaml2obj %p/Inputs/x86_64_macho_with_debug.yaml -o %t-x86_64.o
7 # RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t.o
9 # RUN: llvm-dwarfdump --show-section-sizes %t.o \
10 # RUN: | FileCheck %s -DFILE=%t.o --match-full-lines --strict-whitespace
12 # CHECK:----------------------------------------------------
13 # CHECK-NEXT:file: [[FILE]](i386)
14 # CHECK-NEXT:----------------------------------------------------
15 # CHECK-NEXT:SECTION SIZE (b)
16 # CHECK-NEXT:------------ --------
17 # CHECK-NEXT:__debug_info 52 (12.04%)
19 # CHECK-NEXT: Total Size: 52 (12.04%)
20 # CHECK-NEXT: Total File Size: 432
21 # CHECK-NEXT:----------------------------------------------------
22 # CHECK-NEXT:----------------------------------------------------
23 # CHECK-NEXT:file: [[FILE]](x86_64)
24 # CHECK-NEXT:----------------------------------------------------
25 # CHECK-NEXT:SECTION SIZE (b)
26 # CHECK-NEXT:------------ --------
27 # CHECK-NEXT:__debug_info 64 (13.11%)
29 # CHECK-NEXT: Total Size: 64 (13.11%)
30 # CHECK-NEXT: Total File Size: 488
31 # CHECK-NEXT:----------------------------------------------------