brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 59f116d Raw
42 lines · plain
1; RUN: mkdir -p %t && cd %t2; RUN: opt < %s -S -passes=insert-gcov-profiling \3; RUN:  -mtriple=x86_64-unknown-linux-gnu | FileCheck \4; RUN:  --check-prefixes=CHECK,CHECK-CTOR-INIT %s5; RUN: opt < %s -S -passes=insert-gcov-profiling \6; RUN:  -mtriple=powerpc64-ibm-aix | FileCheck \7; RUN:  --check-prefixes=CHECK,CHECK-RT-INIT %s8 9; Check for gcov initialization function pointers when we initialize10; the writeout and reset functions in the runtime.11; CHECK-RT-INIT: @__llvm_covinit_functions = private constant { ptr, ptr } { ptr @__llvm_gcov_writeout, ptr @__llvm_gcov_reset }, section "__llvm_covinit"12 13define dso_local void @empty() !dbg !5 {14entry:15  ret void, !dbg !816}17 18!llvm.dbg.cu = !{!0}19!llvm.module.flags = !{!3, !4, !9, !10}20 21!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug, enums: !2)22!1 = !DIFile(filename: "a.c", directory: "")23!2 = !{}24!3 = !{i32 7, !"Dwarf Version", i32 5}25!4 = !{i32 2, !"Debug Info Version", i32 3}26!5 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !6, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)27!6 = !DISubroutineType(types: !7)28!7 = !{null}29!8 = !DILocation(line: 2, column: 1, scope: !5)30 31;; Due to -fasynchronous-unwind-tables.32!9 = !{i32 7, !"uwtable", i32 2}33 34;; Due to -fno-omit-frame-pointer.35!10 = !{i32 7, !"frame-pointer", i32 2}36 37;; Infer uwtable and "frame-pointer" from the module flags.38; CHECK: define internal void @__llvm_gcov_writeout() unnamed_addr #[[#ATTR:]]39; CHECK: define internal void @__llvm_gcov_reset() unnamed_addr #[[#ATTR]]40; CHECK-CTOR-INIT: define internal void @__llvm_gcov_init() unnamed_addr #[[#ATTR]]41; CHECK: attributes #[[#ATTR]] = { noinline nounwind uwtable "frame-pointer"="all" }42