|
| 1 | +; RUN: llvm-as < %s -o %t.bc |
| 2 | + |
| 3 | +; RUN: llvm-spirv %t.bc -o %t.spv |
| 4 | +; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s |
| 5 | + |
| 6 | +; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100 |
| 7 | +; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s |
| 8 | + |
| 9 | +; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200 |
| 10 | +; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s |
| 11 | + |
| 12 | +; Generated from: |
| 13 | +; |
| 14 | +; struct A { |
| 15 | +; static int fully_specified; |
| 16 | +; static int smem[]; |
| 17 | +; }; |
| 18 | +; |
| 19 | +; int A::fully_specified; |
| 20 | +; int A::smem[] = { 0, 1, 2, 3 }; |
| 21 | + |
| 22 | +; CHECK: ![[#]] = !DIDerivedType(tag: DW_TAG_variable, name: "smem", scope: ![[#StructTy:]], file: ![[#]], line: 4, baseType: ![[#]], flags: DIFlagPublic | DIFlagStaticMember) |
| 23 | +; CHECK: ![[#]] = !DIDerivedType(tag: DW_TAG_variable, name: "fully_specified", scope: ![[#StructTy]], file: ![[#]], line: 3, baseType: ![[#]], flags: DIFlagPublic | DIFlagStaticMember) |
| 24 | + |
| 25 | + |
| 26 | +source_filename = "static_member_array.cpp" |
| 27 | +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 28 | +target triple = "spir64-unknown-unknown" |
| 29 | + |
| 30 | +@_ZN1A15fully_specifiedE = global i32 0, align 4, !dbg !0 |
| 31 | +@_ZN1A4smemE = global [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16, !dbg !6 |
| 32 | + |
| 33 | +!llvm.dbg.cu = !{!2} |
| 34 | +!llvm.module.flags = !{!19, !20, !21} |
| 35 | + |
| 36 | +!0 = distinct !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) |
| 37 | +!1 = !DIGlobalVariable(name: "fully_specified", linkageName: "_ZN1A15fully_specifiedE", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true, declaration: !15) |
| 38 | +!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) |
| 39 | +!3 = !DIFile(filename: "static_member_array.cpp", directory: "") |
| 40 | +!4 = !{} |
| 41 | +!5 = !{!0, !6} |
| 42 | +!6 = distinct !DIGlobalVariableExpression(var: !7, expr: !DIExpression()) |
| 43 | +!7 = !DIGlobalVariable(name: "smem", linkageName: "_ZN1A4smemE", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true, declaration: !12) |
| 44 | +!8 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 128, elements: !10) |
| 45 | +!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 46 | +!10 = !{!11} |
| 47 | +!11 = !DISubrange(count: 4) |
| 48 | +!12 = !DIDerivedType(tag: DW_TAG_variable, name: "smem", scope: !13, file: !3, line: 4, baseType: !16, flags: DIFlagStaticMember) |
| 49 | +!13 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !3, line: 1, size: 8, elements: !14, identifier: "_ZTS1A") |
| 50 | +!14 = !{!15, !12} |
| 51 | +!15 = !DIDerivedType(tag: DW_TAG_variable, name: "fully_specified", scope: !13, file: !3, line: 3, baseType: !9, flags: DIFlagStaticMember) |
| 52 | +!16 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, elements: !17) |
| 53 | +!17 = !{!18} |
| 54 | +!18 = !DISubrange(count: -1) |
| 55 | +!19 = !{i32 2, !"Dwarf Version", i32 5} |
| 56 | +!20 = !{i32 2, !"Debug Info Version", i32 3} |
| 57 | +!21 = !{i32 1, !"PIC Level", i32 2} |
| 58 | + |
0 commit comments