|
| 1 | +;; Ensure __llvm_gcov_(writeout|reset|init) have the correct !kcfi_type |
| 2 | +;; with integer normalization. |
| 3 | +; RUN: mkdir -p %t && cd %t |
| 4 | +; RUN: opt < %s -S -passes=insert-gcov-profiling | FileCheck %s |
| 5 | + |
| 6 | +target triple = "x86_64-unknown-linux-gnu" |
| 7 | + |
| 8 | +define dso_local void @empty() !dbg !5 { |
| 9 | +entry: |
| 10 | + ret void, !dbg !8 |
| 11 | +} |
| 12 | + |
| 13 | +!llvm.dbg.cu = !{!0} |
| 14 | +!llvm.module.flags = !{!3, !4, !9, !10} |
| 15 | + |
| 16 | +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug, enums: !2) |
| 17 | +!1 = !DIFile(filename: "a.c", directory: "") |
| 18 | +!2 = !{} |
| 19 | +!3 = !{i32 7, !"Dwarf Version", i32 5} |
| 20 | +!4 = !{i32 2, !"Debug Info Version", i32 3} |
| 21 | +!5 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !6, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) |
| 22 | +!6 = !DISubroutineType(types: !7) |
| 23 | +!7 = !{null} |
| 24 | +!8 = !DILocation(line: 2, column: 1, scope: !5) |
| 25 | +!9 = !{i32 4, !"kcfi", i32 1} |
| 26 | +!10 = !{i32 4, !"cfi-normalize-integers", i32 1} |
| 27 | + |
| 28 | +; CHECK: define internal void @__llvm_gcov_writeout() |
| 29 | +; CHECK-SAME: !kcfi_type ![[#TYPE:]] |
| 30 | +; CHECK: define internal void @__llvm_gcov_reset() |
| 31 | +; CHECK-SAME: !kcfi_type ![[#TYPE]] |
| 32 | +; CHECK: define internal void @__llvm_gcov_init() |
| 33 | +; CHECK-SAME: !kcfi_type ![[#TYPE]] |
| 34 | + |
| 35 | +; CHECK: ![[#TYPE]] = !{i32 -440107680} |
0 commit comments