Manman Ren | 6035203 | 2013-09-05 18:48:31 +0000 | [diff] [blame] | 1 | ; REQUIRES: object-emission |
| 2 | |
Timur Iskhodzhanov | f166f6c | 2014-01-30 01:39:17 +0000 | [diff] [blame] | 3 | ; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t |
Manman Ren | 6035203 | 2013-09-05 18:48:31 +0000 | [diff] [blame] | 4 | ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s |
Manman Ren | 6035203 | 2013-09-05 18:48:31 +0000 | [diff] [blame] | 5 | ; CHECK: DW_TAG_ptr_to_member_type |
Manman Ren | f4c339e | 2013-10-29 22:49:29 +0000 | [diff] [blame] | 6 | ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]}) |
| 7 | ; CHECK: [[TYPE]]: DW_TAG_base_type |
Manman Ren | 6035203 | 2013-09-05 18:48:31 +0000 | [diff] [blame] | 8 | ; IR generated from clang -g with the following source: |
| 9 | ; struct Foo { |
| 10 | ; int e; |
| 11 | ; }; |
| 12 | ; int Foo:*x = 0; |
| 13 | |
| 14 | @x = global i64 -1, align 8 |
| 15 | |
| 16 | !llvm.dbg.cu = !{!0} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 17 | !llvm.module.flags = !{!10, !11} |
Manman Ren | 6035203 | 2013-09-05 18:48:31 +0000 | [diff] [blame] | 18 | |
Duncan P. N. Exon Smith | 55ca964 | 2015-08-03 17:26:41 +0000 | [diff] [blame] | 19 | !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !5, imports: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 20 | !1 = !DIFile(filename: "foo.cpp", directory: ".") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 21 | !2 = !{} |
| 22 | !3 = !{!4} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 23 | !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS3Foo") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 24 | !5 = !{!6} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 25 | !6 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !7, type: !8, variable: i64* @x) |
| 26 | !7 = !DIFile(filename: "foo.cpp", directory: ".") |
| 27 | !8 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !9, extraData: !"_ZTS3Foo") |
| 28 | !9 = !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] | 29 | !10 = !{i32 2, !"Dwarf Version", i32 2} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 30 | !11 = !{i32 1, !"Debug Info Version", i32 3} |