blob: bad080cb72546b50cd477798094e82ef4b980ef3 [file] [log] [blame]
Bill Wendlingbfc0e572012-12-04 06:20:49 +00001; RUN: llc -mtriple=x86_64-apple-darwin -O0 -filetype=obj -o %t < %s
Eli Benderskye6abe832013-01-25 21:44:53 +00002; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
Bill Wendlingbfc0e572012-12-04 06:20:49 +00003; <rdar://problem/12566646>
4
5%class.A = type { [0 x i32] }
6
7@a = global %class.A zeroinitializer, align 4
8
Manman Renf4c339e2013-10-29 22:49:29 +00009; CHECK: DW_TAG_class_type
10; CHECK: DW_TAG_member
11; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "x")
12; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY:0x[0-9a-f]*]]})
13
14; CHECK: [[ARRAY]]: DW_TAG_array_type [{{.*}}] *
15; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASETYPE:0x[0-9a-f]*]]})
16
17; CHECK: DW_TAG_subrange_type
18; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]})
19; CHECK-NOT: DW_AT_upper_bound
20
21; CHECK: [[BASETYPE]]: DW_TAG_base_type
22; CHECK: [[BASE2]]: DW_TAG_base_type
Eric Christophercad9b532013-01-04 21:51:53 +000023; CHECK-NEXT: DW_AT_name
David Blaikie12e00fc2014-04-03 06:28:20 +000024; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x08)
Frederic Riss878065b2014-09-04 19:39:20 +000025; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (DW_ATE_unsigned)
Bill Wendlingbfc0e572012-12-04 06:20:49 +000026
Bill Wendlingbfc0e572012-12-04 06:20:49 +000027!llvm.dbg.cu = !{!0}
Manman Ren409558f2013-11-22 21:49:45 +000028!llvm.module.flags = !{!21}
Bill Wendlingbfc0e572012-12-04 06:20:49 +000029
Duncan P. N. Exon Smith55ca9642015-08-03 17:26:41 +000030!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: 0, file: !20, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000031!1 = !{}
32!3 = !{!5}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000033!5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %class.A* @a)
34!6 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
35!7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, align: 32, file: !20, elements: !8)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000036!8 = !{!9, !14}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000037!9 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 1, flags: DIFlagPrivate, file: !20, scope: !7, baseType: !10)
38!10 = !DICompositeType(tag: DW_TAG_array_type, align: 32, baseType: !11, elements: !12)
39!11 = !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 +000040!12 = !{!13}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000041!13 = !DISubrange(count: -1)
42!14 = !DISubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15)
43!15 = !DISubroutineType(types: !16)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000044!16 = !{null, !17}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000045!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !7)
46!20 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000047!21 = !{i32 1, !"Debug Info Version", i32 3}