1 ; REQUIRES: object-emission 2 3 ; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t 4 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s 5 ; CHECK: DW_TAG_ptr_to_member_type 6 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]}) 7 ; CHECK: [[TYPE]]: DW_TAG_base_type 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} 17 !llvm.module.flags = !{!10, !11} 18 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) 20 !1 = !DIFile(filename: "foo.cpp", directory: ".") 21 !2 = !{} 22 !3 = !{!4} 23 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS3Foo") 24 !5 = !{!6} 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) 29 !10 = !{i32 2, !"Dwarf Version", i32 2} 30 !11 = !{i32 1, !"Debug Info Version", i32 3} 31