1# RUN: rm -rf %t
2# RUN: mkdir -p %t
3# RUN: llc -filetype=obj %p/../Inputs/frame-dw2.ll -o %t/frame-dw2.o
4# RUN: dsymutil -f -oso-prepend-path=%t -y %s -o - | llvm-dwarfdump -debug-frame - | FileCheck %s
5
6# This test is meant to verify that identical CIEs will get reused
7# in the same file but also inbetween files. For this to happen, we
8# link twice the same file using this made-up debug map:
9
10---
11triple:          'i386-apple-darwin'
12objects:
13  - filename: frame-dw2.o
14    symbols:
15      - { sym: _bar, objAddr: 0x0, binAddr: 0x1000, size: 0x12 }
16      - { sym: _baz, objAddr: 0x0, binAddr: 0x2000, size: 0x12 }
17  - filename: frame-dw2.o
18    symbols:
19      - { sym: _baz, objAddr: 0x0, binAddr: 0x3000, size: 0x12 }
20...
21
22# CHECK: .debug_frame contents:
23# CHECK: 00000000 {{[0-9a-f]*}} ffffffff CIE
24# CHECK-NOT: FDE
25# CHECK:  FDE cie=00000000 pc=00001000...00001
26# CHECK-NOT: FDE
27# CHECK:  FDE cie=00000000 pc=00002000...00002
28# CHECK-NOT: FDE
29# CHECK:  FDE cie=00000000 pc=00003000...00003
30# CHECK-NOT: FDE
31# CHECK: .eh_frame contents:
32