• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: object-emission
2
3; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t
4; RUN: llvm-dwarfdump -v -debug-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
14source_filename = "test/DebugInfo/Generic/tu-member-pointer.ll"
15
16@x = global i64 -1, align 8, !dbg !0
17
18!llvm.dbg.cu = !{!6}
19!llvm.module.flags = !{!10, !11}
20
21!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
22!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true)
23!2 = !DIFile(filename: "foo.cpp", directory: ".")
24!3 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, extraData: !5)
25!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
26!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !2, line: 1, flags: DIFlagFwdDecl, identifier: "_ZTS3Foo")
27!6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !7, retainedTypes: !8, globals: !9, imports: !7)
28!7 = !{}
29!8 = !{!5}
30!9 = !{!0}
31!10 = !{i32 2, !"Dwarf Version", i32 2}
32!11 = !{i32 1, !"Debug Info Version", i32 3}
33
34