1 ;; Ensure __llvm_gcov_(writeout|reset|init) have !kcfi_type with KCFI.
2 ; RUN: mkdir -p %t && cd %t
3 ; RUN: opt < %s -S -passes=insert-gcov-profiling | FileCheck %s
5 target triple = "x86_64-unknown-linux-gnu"
7 define dso_local void @empty() !dbg !5 {
13 !llvm.module.flags = !{!3, !4, !9}
15 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug, enums: !2)
16 !1 = !DIFile(filename: "a.c", directory: "")
18 !3 = !{i32 7, !"Dwarf Version", i32 5}
19 !4 = !{i32 2, !"Debug Info Version", i32 3}
20 !5 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !6, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
21 !6 = !DISubroutineType(types: !7)
23 !8 = !DILocation(line: 2, column: 1, scope: !5)
24 !9 = !{i32 4, !"kcfi", i32 1}
26 ; CHECK: define internal void @__llvm_gcov_writeout()
27 ; CHECK-SAME: !kcfi_type
28 ; CHECK: define internal void @__llvm_gcov_reset()
29 ; CHECK-SAME: !kcfi_type
30 ; CHECK: define internal void @__llvm_gcov_init()
31 ; CHECK-SAME: !kcfi_type