Turn off lldb debug tuning by default for FreeBSD
[oota-llvm.git] / test / DebugInfo / X86 / externaltyperef.ll
1 ; REQUIRES: object-emission
2 ; RUN: %llc_dwarf -filetype=obj -O0 < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
3 ; Manually derived by externalizing the composite types from:
4 ;
5 ;   namespace N { class B; }
6 ;   using N::B;
7 ;   class A;
8 ;   A *a;
9 ;
10 ; Test the direct use of an external type.
11 ; CHECK: DW_TAG_variable
12 ; CHECK:   DW_AT_type [DW_FORM_ref4]      {{.*}}{[[PTR:.*]]}
13 ; CHECK: [[PTR]]: DW_TAG_pointer_type
14 ; CHECK:   DW_AT_type [DW_FORM_ref4]      {{.*}}{[[A:.*]]}
15 ; CHECK: [[A]]: DW_TAG_class_type
16 ; CHECK:   DW_AT_declaration [DW_FORM_flag]     (0x01)
17 ; CHECK:   DW_AT_signature [DW_FORM_ref_sig8]   (0x4e834ea939695c24)
18 ; CHECK: [[B:.*]]: DW_TAG_class_type
19 ; CHECK:   DW_AT_declaration [DW_FORM_flag]     (0x01)
20 ; CHECK:   DW_AT_signature [DW_FORM_ref_sig8]   (0x942e51c7addda5f7)
21 ; CHECK:   DW_TAG_imported_declaration
22 ; CHECK:     DW_AT_import [DW_FORM_ref4]  {{.*}}[[B]]
23
24 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
25 target triple = "x86_64-apple-macosx10.10.0"
26
27 %class.A = type opaque
28
29 @a = global %class.A* null, align 8
30
31 !llvm.dbg.cu = !{!0}
32 !llvm.module.flags = !{!13, !14, !15}
33 !llvm.ident = !{!16}
34
35 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 242039) (llvm/trunk 242046)", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !3, globals: !5, imports: !11)
36 !1 = !DIFile(filename: "test.cpp", directory: "/")
37 !2 = !{}
38 !3 = !{!4, !9}
39 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1A")
40 !5 = !{!6}
41 !6 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: %class.A** @a)
42 !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A", size: 64, align: 64)
43 !8 = !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1B")
44 !9 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTSN1N1BE")
45 !10 = !DINamespace(name: "N", scope: null, file: !1, line: 1)
46 !11 = !{!12}
47 !12 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !"_ZTSN1N1BE", line: 4)
48 !13 = !{i32 2, !"Dwarf Version", i32 2}
49 !14 = !{i32 2, !"Debug Info Version", i32 3}
50 !15 = !{i32 1, !"PIC Level", i32 2}
51 !16 = !{!"clang version 3.7.0 (trunk 242039) (llvm/trunk 242046)"}