1 ; RUN: echo '!16 = metadata !{metadata !"%T/global-ctor.ll", metadata !0}' > %t1 2 ; RUN: cat %s %t1 > %t2 3 ; RUN: opt -insert-gcov-profiling -disable-output < %t2 4 ; RUN: not grep '_GLOBAL__sub_I_global-ctor' %T/global-ctor.gcno 5 ; RUN: rm %T/global-ctor.gcno 6 7 ; REQUIRES: shell 8 9 @x = global i32 0, align 4 10 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_global-ctor.ll, i8* null }] 11 12 ; Function Attrs: nounwind 13 define internal void @__cxx_global_var_init() #0 section ".text.startup" { 14 entry: 15 br label %0 16 17 ; <label>:0 ; preds = %entry 18 %call = call i32 @_Z1fv(), !dbg !13 19 store i32 %call, i32* @x, align 4, !dbg !13 20 ret void, !dbg !13 21 } 22 23 declare i32 @_Z1fv() #1 24 25 ; Function Attrs: nounwind 26 define internal void @_GLOBAL__sub_I_global-ctor.ll() #0 section ".text.startup" { 27 entry: 28 br label %0 29 30 ; <label>:0 ; preds = %entry 31 call void @__cxx_global_var_init(), !dbg !14 32 ret void, !dbg !14 33 } 34 35 attributes #0 = { nounwind } 36 attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 37 38 !llvm.dbg.cu = !{!0} 39 !llvm.module.flags = !{!10, !11} 40 !llvm.gcov = !{!16} 41 !llvm.ident = !{!12} 42 43 !0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.5.0 (trunk 210217)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 2} ; [ DW_TAG_compile_unit ] [/home/nlewycky/<stdin>] [DW_LANG_C_plus_plus] 44 !1 = metadata !{metadata !"<stdin>", metadata !"/home/nlewycky"} 45 !2 = metadata !{} 46 !3 = metadata !{metadata !4, metadata !8} 47 !4 = metadata !{i32 786478, metadata !5, metadata !6, metadata !"__cxx_global_var_init", metadata !"__cxx_global_var_init", metadata !"", i32 2, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @__cxx_global_var_init, null, null, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [local] [def] [__cxx_global_var_init] 48 !5 = metadata !{metadata !"global-ctor.ll", metadata !"/home/nlewycky"} 49 !6 = metadata !{i32 786473, metadata !5} ; [ DW_TAG_file_type ] [/home/nlewycky/global-ctor.ll] 50 !7 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !2, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] 51 !8 = metadata !{i32 786478, metadata !1, metadata !9, metadata !"", metadata !"", metadata !"_GLOBAL__sub_I_global-ctor.ll", i32 0, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 64, i1 false, void ()* @_GLOBAL__sub_I_global-ctor.ll, null, null, metadata !2, i32 0} ; [ DW_TAG_subprogram ] [line 0] [local] [def] 52 !9 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/home/nlewycky/<stdin>] 53 !10 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} 54 !11 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} 55 !12 = metadata !{metadata !"clang version 3.5.0 (trunk 210217)"} 56 !13 = metadata !{i32 2, i32 0, metadata !4, null} 57 !14 = metadata !{i32 0, i32 0, metadata !15, null} 58 !15 = metadata !{i32 786443, metadata !5, metadata !8} ; [ DW_TAG_lexical_block ] [/home/nlewycky/global-ctor.ll] 59