1 # RUN: llvm-mc %s -filetype obj -triple x86_64-linux-elf -o %t.o
2 # RUN: llvm-cfi-verify %t.o 2>&1 --summarize | FileCheck %s
4 # This is the same file as protected-lineinfo.s, however contains a hand-
5 # assembled function (fake_function) that has no line table information
6 # associated with it. Because there is no LT info, the indirect call made in the
7 # function should not be reported at all by llvm-cfi-verify.
9 # We can test that this indirect call is ignored from the final statistics
10 # reporting of the cfi-verify program. It should only find a single indirect CF
11 # instruction at `tiny.cc:11` (see protected-lineinfo.s for the source).
13 # CHECK-NOT: Begin Instruction
15 # CHECK: Expected Protected: 1 (100.00%)
16 # CHECK: Unexpected Protected: 0 (0.00%)
17 # CHECK: Expected Unprotected: 0 (0.00%)
18 # CHECK: Unexpected Unprotected (BAD): 0 (0.00%)
23 .type fake_function,@function
34 .type _Z1av.cfi,@function
41 .cfi_def_cfa_offset 16
44 .cfi_def_cfa_register %rbp
46 .loc 1 3 11 prologue_end
51 .size _Z1av.cfi, .Lfunc_end0-_Z1av.cfi
55 .type _Z1bv.cfi,@function
61 .cfi_def_cfa_offset 16
64 .cfi_def_cfa_register %rbp
66 .loc 1 4 11 prologue_end
71 .size _Z1bv.cfi, .Lfunc_end1-_Z1bv.cfi
83 .cfi_def_cfa_offset 16
86 .cfi_def_cfa_register %rbp
93 .loc 1 8 12 prologue_end
98 leaq _Z1av
(%rip
), %rax
105 leaq _Z1bv
(%rip
), %rax
106 .loc 1 11 9 is_stmt 1
110 leaq
.L.cfi.jumptable(%rip), %rcx
111 .loc 1 13 3 is_stmt 1
133 .size main, .Lfunc_end2-main
137 .type .L.cfi.jumptable,@function
153 .size .L.cfi.jumptable, .Lfunc_end3-.L.cfi.jumptable
156 .section .debug_str,"MS",@progbits,1
158 .asciz "clang version 6.0.0 (trunk 316774)"
163 .section .debug_abbrev,"",@progbits
184 .section .debug_info,"",@progbits
194 .long .Lline_table_start0
197 .long .Lfunc_end2-.Lfunc_begin0
198 .section .debug_ranges,"",@progbits
199 .section .debug_macinfo,"",@progbits
203 .type _Z1av,@function
204 _Z1av
= .L.cfi.jumptable
205 .type _Z1bv,@function
206 _Z1bv
= .L.cfi.jumptable+8
207 .ident "clang version 6.0.0 (trunk 316774)"
208 .section ".note.GNU-stack","",@progbits
209 .section .debug_line,"",@progbits