1 # Check that llvm-bolt is able to read a file with DWARF Exception CFI
2 # information and annotate this into a disassembled function.
4 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
5 # RUN: %clang %cflags %t.o -o %t.exe
6 # RUN: llvm-bolt %t.exe -o /dev/null --print-cfg 2>&1 | FileCheck %s
8 # CHECK: Binary Function "_Z7catchitv" after building cfg {
9 # CHECK: CFI Instrs : 6
11 # CHECK: DWARF CFI Instructions:
12 # CHECK: 0: OpDefCfaOffset
14 # CHECK: 2: OpDefCfaRegister
18 # CHECK: End of Function "_Z7catchitv"
24 # FDATA: 0 [unknown] 0 1 main 0 0 0
28 .cfi_def_cfa_offset 16
31 .cfi_def_cfa_register %rbp
34 callq _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
37 callq _ZNSolsEPFRSoS_E@PLT
48 .type _Z7catchitv, %function
50 # FDATA: 0 [unknown] 0 1 _Z7catchitv 0 0 0
54 .cfi_def_cfa_offset 16
57 .cfi_def_cfa_register %rbp
65 # FDATA: 1 _Z7catchitv #.LBB00_br# 1 _Z7catchitv #.Ltmp0# 0 0
70 # FDATA: 1 _Z7catchitv #.LLP0_br# 1 _Z7catchitv #.Ltmp1# 0 0
71 # FDATA: 1 _Z7catchitv #.LLP0_br# 1 _Z7catchitv #.LFT0# 0 0
75 .LFT0_br: callq _Unwind_Resume@PLT
76 # FDATA: 1 _Z7catchitv #.LFT0_br# 1 _Z7catchitv #.Ltmp1# 0 0
80 callq __cxa_begin_catch@PLT
81 movq
%rax
, -0x18(%rbp
)
84 callq _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
86 # FDATA: 1 _Z7catchitv #.Ltmp1_br# 1 _Z7catchitv #.Ltmp2# 0 0
91 callq __cxa_end_catch@PLT
95 .LLP1_br: callq _Unwind_Resume@PLT
96 # FDATA: 1 _Z7catchitv #.LLP1_br# 1 _Z7catchitv #.Ltmp2# 0 0
99 .Ltmp2_br: callq __cxa_end_catch@PLT
100 # FDATA: 1 _Z7catchitv #.Ltmp2_br# 1 _Z7catchitv #.Ltmp0# 0 0
111 .size _Z7catchitv, .-_Z7catchitv