Jyotsna Verma | 9dea095 | 2013-04-10 19:53:26 +0000 | [diff] [blame] | 1 | ; REQUIRES: object-emission |
Eric Christopher | b2a602d | 2013-04-27 01:07:22 +0000 | [diff] [blame] | 2 | ; XFAIL: hexagon |
Jyotsna Verma | 9dea095 | 2013-04-10 19:53:26 +0000 | [diff] [blame] | 3 | |
Timur Iskhodzhanov | f166f6c | 2014-01-30 01:39:17 +0000 | [diff] [blame] | 4 | ; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t |
Eli Bendersky | e6abe83 | 2013-01-25 21:44:53 +0000 | [diff] [blame] | 5 | ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s |
David Blaikie | 5d3249b | 2013-01-07 05:51:15 +0000 | [diff] [blame] | 6 | ; CHECK: DW_TAG_ptr_to_member_type |
Manman Ren | f4c339e | 2013-10-29 22:49:29 +0000 | [diff] [blame] | 7 | ; CHECK: DW_TAG_ptr_to_member_type |
| 8 | ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]}) |
| 9 | ; CHECK: [[TYPE]]: DW_TAG_subroutine_type |
David Blaikie | 9a7a7a9 | 2013-01-29 19:35:24 +0000 | [diff] [blame] | 10 | ; CHECK: DW_TAG_formal_parameter |
| 11 | ; CHECK-NEXT: DW_AT_type |
Eric Christopher | 203e12b | 2013-04-27 01:07:52 +0000 | [diff] [blame] | 12 | ; CHECK-NEXT: DW_AT_artificial [DW_FORM_flag |
David Blaikie | 5d3249b | 2013-01-07 05:51:15 +0000 | [diff] [blame] | 13 | ; IR generated from clang -g with the following source: |
| 14 | ; struct S { |
| 15 | ; }; |
| 16 | ; |
| 17 | ; int S::*x = 0; |
| 18 | ; void (S::*y)(int) = 0; |
| 19 | |
David Blaikie | 5d3249b | 2013-01-07 05:51:15 +0000 | [diff] [blame] | 20 | @x = global i64 -1, align 8 |
| 21 | @y = global { i64, i64 } zeroinitializer, align 8 |
| 22 | |
| 23 | !llvm.dbg.cu = !{!0} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 24 | !llvm.module.flags = !{!16} |
David Blaikie | 5d3249b | 2013-01-07 05:51:15 +0000 | [diff] [blame] | 25 | |
Duncan P. N. Exon Smith | 55ca964 | 2015-08-03 17:26:41 +0000 | [diff] [blame] | 26 | !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: 0, file: !15, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 27 | !1 = !{} |
| 28 | !3 = !{!5, !10} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 29 | !5 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i64* @x) |
| 30 | !6 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch") |
| 31 | !7 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !8, extraData: !9) |
| 32 | !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 33 | !9 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", line: 1, size: 8, align: 8, file: !15, elements: !1) |
| 34 | !10 = !DIGlobalVariable(name: "y", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11, variable: { i64, i64 }* @y) |
| 35 | !11 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !12, extraData: !9) |
| 36 | !12 = !DISubroutineType(types: !13) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 37 | !13 = !{null, !14, !8} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 38 | !14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9) |
| 39 | !15 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch") |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 40 | !16 = !{i32 1, !"Debug Info Version", i32 3} |