brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 5e0e91f Raw
41 lines · plain
1;; Ensure __llvm_gcov_(writeout|reset|init) have !kcfi_type with KCFI.2; RUN: mkdir -p %t && cd %t3; RUN: opt < %s -S -passes=insert-gcov-profiling \4; RUN:  -mtriple=x86_64-unknown-linux-gnu | FileCheck \5; RUN:  --check-prefixes=CHECK,CHECK-CTOR-INIT %s6; RUN: opt < %s -S -passes=insert-gcov-profiling \7; RUN:  -mtriple=powerpc64-ibm-aix | FileCheck \8; RUN:  --check-prefixes=CHECK,CHECK-RT-INIT %s9 10; Check for gcov initialization function pointers when we initialize11; the writeout and reset functions in the runtime.12; CHECK-RT-INIT: @__llvm_covinit_functions = private constant { ptr, ptr } { ptr @__llvm_gcov_writeout, ptr @__llvm_gcov_reset }, section "__llvm_covinit"13 14define dso_local void @empty() !dbg !5 {15entry:16  ret void, !dbg !817}18 19!llvm.dbg.cu = !{!0}20!llvm.module.flags = !{!3, !4, !9}21 22!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug, enums: !2)23!1 = !DIFile(filename: "a.c", directory: "")24!2 = !{}25!3 = !{i32 7, !"Dwarf Version", i32 5}26!4 = !{i32 2, !"Debug Info Version", i32 3}27!5 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !6, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)28!6 = !DISubroutineType(types: !7)29!7 = !{null}30!8 = !DILocation(line: 2, column: 1, scope: !5)31!9 = !{i32 4, !"kcfi", i32 1}32 33; CHECK: define internal void @__llvm_gcov_writeout()34; CHECK-SAME: !kcfi_type ![[#TYPE:]]35; CHECK: define internal void @__llvm_gcov_reset()36; CHECK-SAME: !kcfi_type ![[#TYPE]]37; CHECK-CTOR-INIT: define internal void @__llvm_gcov_init()38; CHECK-CTOR-INIT-SAME: !kcfi_type ![[#TYPE]]39 40; CHECK: ![[#TYPE]] = !{i32 -1522505972}41