1 ## Check how llvm-dwarfdump calculates section sizes
2 ## with --show-section-sizes on an archive.
4 # RUN: rm -rf %t && mkdir -p %t
5 # RUN: yaml2obj --docnum=1 %s -o %t/1.o
6 # RUN: yaml2obj --docnum=2 %s -o %t/2.o
9 # RUN: llvm-ar rc %t.a %t/1.o %t/2.o
11 # RUN: llvm-dwarfdump --show-section-sizes %t.a \
12 # RUN: | FileCheck %s -DARCHIVE=%t.a --match-full-lines --strict-whitespace
14 # CHECK:----------------------------------------------------
15 # CHECK-NEXT:file: [[ARCHIVE]](1.o)
16 # CHECK-NEXT:----------------------------------------------------
17 # CHECK-NEXT:SECTION SIZE (b)
18 # CHECK-NEXT:----------- --------
19 # CHECK-NEXT:.debug_info 17 (3.17%)
20 # CHECK-NEXT:.debug_line 19 (3.54%)
22 # CHECK-NEXT: Total Size: 36 (6.72%)
23 # CHECK-NEXT: Total File Size: 536
24 # CHECK-NEXT:----------------------------------------------------
25 # CHECK-NEXT:----------------------------------------------------
26 # CHECK-NEXT:file: [[ARCHIVE]](2.o)
27 # CHECK-NEXT:----------------------------------------------------
28 # CHECK-NEXT:SECTION SIZE (b)
29 # CHECK-NEXT:----------- --------
30 # CHECK-NEXT:.debug_loc 1 (0.20%)
31 # CHECK-NEXT:.debug_line 13 (2.54%)
33 # CHECK-NEXT: Total Size: 14 (2.73%)
34 # CHECK-NEXT: Total File Size: 512
35 # CHECK-NEXT:----------------------------------------------------