• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: object-emission
2; XFAIL: hexagon
3
4; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t
5; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s
6; CHECK: DW_TAG_ptr_to_member_type
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
10; CHECK: DW_TAG_formal_parameter
11; CHECK-NEXT: DW_AT_type
12; CHECK-NEXT: DW_AT_artificial [DW_FORM_flag
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
20source_filename = "test/DebugInfo/Generic/member-pointers.ll"
21
22@x = global i64 -1, align 8, !dbg !0
23@y = global { i64, i64 } zeroinitializer, align 8, !dbg !7
24
25!llvm.dbg.cu = !{!13}
26!llvm.module.flags = !{!15}
27
28!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
29!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true)
30!2 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch")
31!3 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, extraData: !5)
32!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
33!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !2, line: 1, size: 8, align: 8, elements: !6)
34!6 = !{}
35!7 = !DIGlobalVariableExpression(var: !8, expr: !DIExpression())
36!8 = !DIGlobalVariable(name: "y", scope: null, file: !2, line: 5, type: !9, isLocal: false, isDefinition: true)
37!9 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !10, extraData: !5)
38!10 = !DISubroutineType(types: !11)
39!11 = !{null, !12, !4}
40!12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
41!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.3 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, retainedTypes: !6, globals: !14, imports: !6)
42!14 = !{!0, !7}
43!15 = !{i32 1, !"Debug Info Version", i32 3}
44
45