15f2a7fa6SAlexey Lapshin# RUN: rm -rf %t 25f2a7fa6SAlexey Lapshin# RUN: mkdir -p %t 35f2a7fa6SAlexey Lapshin# RUN: llc -filetype=obj %p/../../Inputs/frame-dw2.ll -o %t/frame-dw2.o 4*f1fdfe68SAlexey Lapshin# RUN: dsymutil --linker parallel -f -oso-prepend-path=%t -y %s -o - | \ 55f2a7fa6SAlexey Lapshin# RUN: llvm-dwarfdump -debug-frame - | FileCheck %s 65f2a7fa6SAlexey Lapshin 75f2a7fa6SAlexey Lapshin# This test is meant to verify that identical CIEs will get reused 85f2a7fa6SAlexey Lapshin# in the same file but not inbetween files. For this to happen, we 95f2a7fa6SAlexey Lapshin# link twice the same file using this made-up debug map: 105f2a7fa6SAlexey Lapshin 115f2a7fa6SAlexey Lapshin--- 125f2a7fa6SAlexey Lapshintriple: 'i386-apple-darwin' 135f2a7fa6SAlexey Lapshinobjects: 145f2a7fa6SAlexey Lapshin - filename: frame-dw2.o 155f2a7fa6SAlexey Lapshin symbols: 165f2a7fa6SAlexey Lapshin - { sym: _bar, objAddr: 0x0, binAddr: 0x1000, size: 0x12 } 175f2a7fa6SAlexey Lapshin - { sym: _baz, objAddr: 0x0, binAddr: 0x2000, size: 0x12 } 185f2a7fa6SAlexey Lapshin - filename: frame-dw2.o 195f2a7fa6SAlexey Lapshin symbols: 205f2a7fa6SAlexey Lapshin - { sym: _bar, objAddr: 0x0, binAddr: 0x3000, size: 0x12 } 215f2a7fa6SAlexey Lapshin - { sym: _baz, objAddr: 0x0, binAddr: 0x4000, size: 0x12 } 225f2a7fa6SAlexey Lapshin... 235f2a7fa6SAlexey Lapshin 245f2a7fa6SAlexey Lapshin# CHECK: .debug_frame contents: 255f2a7fa6SAlexey Lapshin# CHECK: 00000000 {{[0-9a-f]*}} ffffffff CIE 265f2a7fa6SAlexey Lapshin# CHECK-NOT: FDE 275f2a7fa6SAlexey Lapshin# CHECK: FDE cie=00000000 pc=00001000...00001 285f2a7fa6SAlexey Lapshin# CHECK-NOT: FDE 295f2a7fa6SAlexey Lapshin# CHECK: FDE cie=00000000 pc=00002000...00002 305f2a7fa6SAlexey Lapshin# CHECK: [[CIECU2:[0-9a-f]*]] {{[0-9a-f]*}} ffffffff CIE 315f2a7fa6SAlexey Lapshin# CHECK-NOT: FDE 325f2a7fa6SAlexey Lapshin# CHECK: FDE cie=[[CIECU2]] pc=00003000...00003 335f2a7fa6SAlexey Lapshin# CHECK-NOT: FDE 345f2a7fa6SAlexey Lapshin# CHECK: FDE cie=[[CIECU2]] pc=00004000...00004 355f2a7fa6SAlexey Lapshin# CHECK-NOT: FDE 365f2a7fa6SAlexey Lapshin# CHECK: .eh_frame contents: 37