Eric Christopher | c496435 | 2012-05-23 00:09:20 +0000 | [diff] [blame] | 1 | ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj |
Eli Bendersky | e6abe83 | 2013-01-25 21:44:53 +0000 | [diff] [blame] | 2 | ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s |
Eric Christopher | c496435 | 2012-05-23 00:09:20 +0000 | [diff] [blame] | 3 | |
| 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 Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 9 | !llvm.module.flags = !{!23} |
Eric Christopher | c496435 | 2012-05-23 00:09:20 +0000 | [diff] [blame] | 10 | |
Duncan P. N. Exon Smith | 55ca964 | 2015-08-03 17:26:41 +0000 | [diff] [blame] | 11 | !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 Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 12 | !1 = !{!3, !8, !12} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 13 | !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 Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 16 | !6 = !{!7} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 17 | !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 Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 20 | !10 = !{!11} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 21 | !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 Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 23 | !13 = !{!14} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 24 | !14 = !DIEnumerator(name: "C1", value: 1) ; [ DW_TAG_enumerator ] |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 25 | !15 = !{} |
| 26 | !17 = !{!19, !20, !21} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 27 | !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 Christopher | c496435 | 2012-05-23 00:09:20 +0000 | [diff] [blame] | 31 | |
Manman Ren | f6b936b | 2013-10-29 05:49:41 +0000 | [diff] [blame] | 32 | ; CHECK: DW_TAG_enumeration_type [{{.*}}] |
Eric Christopher | e31e072 | 2013-09-04 22:21:24 +0000 | [diff] [blame] | 33 | ; CHECK: DW_AT_type [DW_FORM_ref4] |
Eric Christopher | 6b8209b | 2013-10-04 22:40:10 +0000 | [diff] [blame] | 34 | ; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true) |
Eric Christopher | c496435 | 2012-05-23 00:09:20 +0000 | [diff] [blame] | 35 | ; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "A") |
| 36 | |
Manman Ren | f6b936b | 2013-10-29 05:49:41 +0000 | [diff] [blame] | 37 | ; CHECK: DW_TAG_enumeration_type [{{.*}}] * |
Eric Christopher | e31e072 | 2013-09-04 22:21:24 +0000 | [diff] [blame] | 38 | ; CHECK: DW_AT_type [DW_FORM_ref4] |
Eric Christopher | 6b8209b | 2013-10-04 22:40:10 +0000 | [diff] [blame] | 39 | ; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true) |
Eric Christopher | c496435 | 2012-05-23 00:09:20 +0000 | [diff] [blame] | 40 | ; 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 Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 45 | !23 = !{i32 1, !"Debug Info Version", i32 3} |