~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/DebugInfo/tu-member-pointer.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 = !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}