blob: fda0b4943a9de83749b67cb5bf5d6c1af16dedaa [file] [log] [blame]
Eric Christopherc4964352012-05-23 00:09:20 +00001; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
Eli Benderskye6abe832013-01-25 21:44:53 +00002; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
Eric Christopherc4964352012-05-23 00:09:20 +00003
4@a = global i32 0, align 4
5@b = global i64 0, align 8
6@c = global i32 0, align 4
7
8!llvm.dbg.cu = !{!0}
Manman Ren409558f2013-11-22 21:49:45 +00009!llvm.module.flags = !{!23}
Eric Christopherc4964352012-05-23 00:09:20 +000010
Duncan P. N. Exon Smith55ca9642015-08-03 17:26:41 +000011!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157269) (llvm/trunk 157264)", isOptimized: false, emissionKind: 0, file: !22, enums: !1, retainedTypes: !15, subprograms: !15, globals: !17, imports: !15)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000012!1 = !{!3, !8, !12}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000013!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", line: 1, size: 32, align: 32, file: !4, baseType: !5, elements: !6)
14!4 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
15!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000016!6 = !{!7}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000017!7 = !DIEnumerator(name: "A1", value: 1) ; [ DW_TAG_enumerator ]
18!8 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "B", line: 2, size: 64, align: 64, file: !4, baseType: !9, elements: !10)
19!9 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000020!10 = !{!11}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000021!11 = !DIEnumerator(name: "B1", value: 1) ; [ DW_TAG_enumerator ]
22!12 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "C", line: 3, size: 32, align: 32, file: !4, elements: !13)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000023!13 = !{!14}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000024!14 = !DIEnumerator(name: "C1", value: 1) ; [ DW_TAG_enumerator ]
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000025!15 = !{}
26!17 = !{!19, !20, !21}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000027!19 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !4, type: !3, variable: i32* @a)
28!20 = !DIGlobalVariable(name: "b", line: 5, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8, variable: i64* @b)
29!21 = !DIGlobalVariable(name: "c", line: 6, isLocal: false, isDefinition: true, scope: null, file: !4, type: !12, variable: i32* @c)
30!22 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
Eric Christopherc4964352012-05-23 00:09:20 +000031
Manman Renf6b936b2013-10-29 05:49:41 +000032; CHECK: DW_TAG_enumeration_type [{{.*}}]
Eric Christophere31e0722013-09-04 22:21:24 +000033; CHECK: DW_AT_type [DW_FORM_ref4]
Eric Christopher6b8209b2013-10-04 22:40:10 +000034; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true)
Eric Christopherc4964352012-05-23 00:09:20 +000035; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "A")
36
Manman Renf6b936b2013-10-29 05:49:41 +000037; CHECK: DW_TAG_enumeration_type [{{.*}}] *
Eric Christophere31e0722013-09-04 22:21:24 +000038; CHECK: DW_AT_type [DW_FORM_ref4]
Eric Christopher6b8209b2013-10-04 22:40:10 +000039; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true)
Eric Christopherc4964352012-05-23 00:09:20 +000040; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "B")
41
42; CHECK: DW_TAG_enumeration_type [6]
43; CHECK-NOT: DW_AT_enum_class
44; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "C")
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000045!23 = !{i32 1, !"Debug Info Version", i32 3}