1*9880d681SAndroid Build Coastguard Worker# REQUIRES: object-emission 2*9880d681SAndroid Build Coastguard Worker# RUN: rm -rf %t 3*9880d681SAndroid Build Coastguard Worker# RUN: mkdir -p %t 4*9880d681SAndroid Build Coastguard Worker# RUN: llc -filetype=obj %p/../Inputs/frame-dw2.ll -o %t/frame-dw2.o 5*9880d681SAndroid Build Coastguard Worker# RUN: llc -filetype=obj %p/../Inputs/frame-dw4.ll -o %t/frame-dw4.o 6*9880d681SAndroid Build Coastguard Worker# RUN: llvm-dsymutil -f -oso-prepend-path=%t -y %s -o - | llvm-dwarfdump -debug-dump=frames - | FileCheck %s 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker# Check the handling of multiple different CIEs. To have CIEs that 9*9880d681SAndroid Build Coastguard Worker# appear to be different, use a dwarf2 version of the file along with 10*9880d681SAndroid Build Coastguard Worker# a dwarf 4 version. The CIE header version (and layout) will be different. 11*9880d681SAndroid Build Coastguard Worker# FIXME: this test also checks that we didn't reuse the first CIE when it 12*9880d681SAndroid Build Coastguard Worker# appears again. This is a behavior we inherited from dsymutil-classic 13*9880d681SAndroid Build Coastguard Worker# but this should be fixed (see comment in patchFrameInfoForObject()) 14*9880d681SAndroid Build Coastguard Worker--- 15*9880d681SAndroid Build Coastguard Workertriple: 'i386-apple-darwin' 16*9880d681SAndroid Build Coastguard Workerobjects: 17*9880d681SAndroid Build Coastguard Worker - filename: frame-dw2.o 18*9880d681SAndroid Build Coastguard Worker symbols: 19*9880d681SAndroid Build Coastguard Worker - { sym: _bar, objAddr: 0x0, binAddr: 0x1000, size: 0x12 } 20*9880d681SAndroid Build Coastguard Worker - { sym: _baz, objAddr: 0x0, binAddr: 0x2000, size: 0x12 } 21*9880d681SAndroid Build Coastguard Worker - filename: frame-dw4.o 22*9880d681SAndroid Build Coastguard Worker symbols: 23*9880d681SAndroid Build Coastguard Worker - { sym: _baz, objAddr: 0x0, binAddr: 0x3000, size: 0x12 } 24*9880d681SAndroid Build Coastguard Worker - filename: frame-dw2.o 25*9880d681SAndroid Build Coastguard Worker symbols: 26*9880d681SAndroid Build Coastguard Worker - { sym: _bar, objAddr: 0x0, binAddr: 0x4000, size: 0x12 } 27*9880d681SAndroid Build Coastguard Worker... 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker# CHECK: .debug_frame contents: 30*9880d681SAndroid Build Coastguard Worker# CHECK: 00000000 {{[0-9a-f]*}} ffffffff CIE 31*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: Version:{{.*}}1 32*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 33*9880d681SAndroid Build Coastguard Worker# CHECK: FDE cie=00000000 pc=00001000...00001 34*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 35*9880d681SAndroid Build Coastguard Worker# CHECK: FDE cie=00000000 pc=00002000...00002 36*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 37*9880d681SAndroid Build Coastguard Worker# CHECK: [[CIEDW4:[0-9a-f]*]] 00000010 ffffffff CIE 38*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: Version:{{.*}}4 39*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 40*9880d681SAndroid Build Coastguard Worker# CHECK: FDE cie=[[CIEDW4]] pc=00003000...00003 41*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 42*9880d681SAndroid Build Coastguard Worker# CHECK: [[CIEDW2:[0-9a-f]*]] {{[0-9a-f]*}} ffffffff CIE 43*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: Version:{{.*}}1 44*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 45*9880d681SAndroid Build Coastguard Worker# CHECK: FDE cie=[[CIEDW2]] pc=00004000...00004 46*9880d681SAndroid Build Coastguard Worker# CHECK-NOT: FDE 47*9880d681SAndroid Build Coastguard Worker 48