Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/X86/static_member_array.ll

raw
1 ; RUN: llvm-as < %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -o %t.spv
3 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o - | llvm-dis -o %t.ll
4
5 ; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
6 ; Generated from:
7 ;
8 ; struct A {
9 ; static int fully_specified;
10 ; static int smem[];
11 ; };
12 ;
13 ; int A::fully_specified;
14 ; int A::smem[] = { 0, 1, 2, 3 };
15 ;
16 ; CHECK: DW_TAG_variable
17 ; CHECK-NEXT: DW_AT_specification{{.*}}"fully_specified"
18 ; CHECK-NOT: DW_AT_type
19 ; CHECK: DW_TAG_structure_type
20 ; CHECK: DW_TAG_member
21 ; CHECK: DW_TAG_member
22 ; CHECK-NEXT: DW_AT_name {{.*}} "smem"
23 ; CHECK-NEXT: DW_AT_type {{.*}} {0x[[GENERIC:[0-9a-f]+]]}
24 ;
25 ; CHECK: 0x[[GENERIC]]: DW_TAG_array_type
26 ; CHECK-NOT: DW_TAG
27 ; CHECK-NOT: NULL
28 ; CHECK: DW_TAG_subrange_type
29 ; CHECK-NOT: DW_AT_count
30 ; CHECK: NULL
31 ;
32 ; CHECK: DW_TAG_variable
33 ; CHECK-NEXT: DW_AT_specification {{.*}}"smem"
34 ; CHECK-NEXT: DW_AT_type {{.*}} {0x[[SPECIFIC:[0-9a-f]+]]}
35 ;
36 ; CHECK: 0x[[SPECIFIC]]: DW_TAG_array_type
37 ; CHECK-NOT: DW_TAG
38 ; CHECK-NOT: NULL
39 ; CHECK: DW_TAG_subrange_type
40 ; CHECK-NOT: DW_TAG
41 ; CHECK-NOT: NULL
42 ; CHECK: DW_AT_count {{.*}} (0x04)
43
44 source_filename = "static_member_array.cpp"
45 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
46 target triple = "spir64-unknown-unknown"
47
48 @_ZN1A15fully_specifiedE = global i32 0, align 4, !dbg !0
49 @_ZN1A4smemE = global [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16, !dbg !6
50
51 !llvm.dbg.cu = !{!2}
52 !llvm.module.flags = !{!19, !20, !21}
53 !llvm.ident = !{!22}
54
55 !0 = distinct !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
56 !1 = !DIGlobalVariable(name: "fully_specified", linkageName: "_ZN1A15fully_specifiedE", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true, declaration: !15)
57 !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
58 !3 = !DIFile(filename: "static_member_array.cpp", directory: "/Volumes/Data/radar/28706946")
59 !4 = !{}
60 !5 = !{!0, !6}
61 !6 = distinct !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
62 !7 = !DIGlobalVariable(name: "smem", linkageName: "_ZN1A4smemE", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true, declaration: !12)
63 !8 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 128, elements: !10)
64 !9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
65 !10 = !{!11}
66 !11 = !DISubrange(count: 4)
67 !12 = !DIDerivedType(tag: DW_TAG_member, name: "smem", scope: !13, file: !3, line: 4, baseType: !16, flags: DIFlagStaticMember)
68 !13 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !3, line: 1, size: 8, elements: !14, identifier: "_ZTS1A")
69 !14 = !{!15, !12}
70 !15 = !DIDerivedType(tag: DW_TAG_member, name: "fully_specified", scope: !13, file: !3, line: 3, baseType: !9, flags: DIFlagStaticMember)
71 !16 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, elements: !17)
72 !17 = !{!18}
73 !18 = !DISubrange(count: -1)
74 !19 = !{i32 2, !"Dwarf Version", i32 4}
75 !20 = !{i32 2, !"Debug Info Version", i32 3}
76 !21 = !{i32 1, !"PIC Level", i32 2}
77 !22 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"}
78