Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame^] | 1 | ; RUN: echo '!16 = !{!"%/T/global-ctor.ll", !0}' > %t1 |
Nick Lewycky | ff114da | 2014-06-05 04:31:43 +0000 | [diff] [blame] | 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 | |
Nick Lewycky | ff114da | 2014-06-05 04:31:43 +0000 | [diff] [blame] | 7 | @x = global i32 0, align 4 |
| 8 | @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_global-ctor.ll, i8* null }] |
| 9 | |
| 10 | ; Function Attrs: nounwind |
| 11 | define internal void @__cxx_global_var_init() #0 section ".text.startup" { |
| 12 | entry: |
| 13 | br label %0 |
| 14 | |
| 15 | ; <label>:0 ; preds = %entry |
| 16 | %call = call i32 @_Z1fv(), !dbg !13 |
| 17 | store i32 %call, i32* @x, align 4, !dbg !13 |
| 18 | ret void, !dbg !13 |
| 19 | } |
| 20 | |
| 21 | declare i32 @_Z1fv() #1 |
| 22 | |
| 23 | ; Function Attrs: nounwind |
| 24 | define internal void @_GLOBAL__sub_I_global-ctor.ll() #0 section ".text.startup" { |
| 25 | entry: |
| 26 | br label %0 |
| 27 | |
| 28 | ; <label>:0 ; preds = %entry |
| 29 | call void @__cxx_global_var_init(), !dbg !14 |
| 30 | ret void, !dbg !14 |
| 31 | } |
| 32 | |
| 33 | attributes #0 = { nounwind } |
| 34 | 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" } |
| 35 | |
| 36 | !llvm.dbg.cu = !{!0} |
| 37 | !llvm.module.flags = !{!10, !11} |
| 38 | !llvm.gcov = !{!16} |
| 39 | !llvm.ident = !{!12} |
| 40 | |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame^] | 41 | !0 = !{!"0x11\004\00clang version 3.5.0 (trunk 210217)\000\00\000\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [/home/nlewycky/<stdin>] [DW_LANG_C_plus_plus] |
| 42 | !1 = !{!"<stdin>", !"/home/nlewycky"} |
| 43 | !2 = !{} |
| 44 | !3 = !{!4, !8} |
| 45 | !4 = !{!"0x2e\00__cxx_global_var_init\00__cxx_global_var_init\00\002\001\001\000\006\00256\000\002", !5, !6, !7, null, void ()* @__cxx_global_var_init, null, null, !2} ; [ DW_TAG_subprogram ] [line 2] [local] [def] [__cxx_global_var_init] |
| 46 | !5 = !{!"global-ctor.ll", !"/home/nlewycky"} |
| 47 | !6 = !{!"0x29", !5} ; [ DW_TAG_file_type ] [/home/nlewycky/global-ctor.ll] |
| 48 | !7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] |
| 49 | !8 = !{!"0x2e\00\00\00_GLOBAL__sub_I_global-ctor.ll\000\001\001\000\006\0064\000\000", !1, !9, !7, null, void ()* @_GLOBAL__sub_I_global-ctor.ll, null, null, !2} ; [ DW_TAG_subprogram ] [line 0] [local] [def] |
| 50 | !9 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/home/nlewycky/<stdin>] |
| 51 | !10 = !{i32 2, !"Dwarf Version", i32 4} |
| 52 | !11 = !{i32 2, !"Debug Info Version", i32 2} |
| 53 | !12 = !{!"clang version 3.5.0 (trunk 210217)"} |
| 54 | !13 = !{i32 2, i32 0, !4, null} |
| 55 | !14 = !{i32 0, i32 0, !15, null} |
| 56 | !15 = !{!"0xb\000", !5, !8} ; [ DW_TAG_lexical_block ] [/home/nlewycky/global-ctor.ll] |