1 ; RUN: mkdir -p %t && cd %t
2 ; RUN: opt < %s -S -passes=insert-gcov-profiling | FileCheck %s
4 target triple = "x86_64-unknown-linux-gnu"
6 define dso_local void @empty() !dbg !5 {
12 !llvm.module.flags = !{!3, !4, !9, !10}
14 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug, enums: !2)
15 !1 = !DIFile(filename: "a.c", directory: "")
17 !3 = !{i32 7, !"Dwarf Version", i32 5}
18 !4 = !{i32 2, !"Debug Info Version", i32 3}
19 !5 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !6, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
20 !6 = !DISubroutineType(types: !7)
22 !8 = !DILocation(line: 2, column: 1, scope: !5)
24 ;; Due to -fasynchronous-unwind-tables.
25 !9 = !{i32 7, !"uwtable", i32 2}
27 ;; Due to -fno-omit-frame-pointer.
28 !10 = !{i32 7, !"frame-pointer", i32 2}
30 ;; Infer uwtable and "frame-pointer" from the module flags.
31 ; CHECK: define internal void @__llvm_gcov_writeout() unnamed_addr #[[#ATTR:]]
32 ; CHECK: define internal void @__llvm_gcov_reset() unnamed_addr #[[#ATTR]]
33 ; CHECK: define internal void @__llvm_gcov_init() unnamed_addr #[[#ATTR]]
34 ; CHECK: attributes #[[#ATTR]] = { noinline nounwind uwtable "frame-pointer"="all" }