Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/NonSemantic/DIImportedEntity.ll

raw
1 ; ModuleID = '/Volumes/Data/apple-internal/llvm/tools/clang/test/Modules/debug-info-moduleimport.m'
2 ; RUN: llvm-as < %s -o %t.bc
3
4 ; RUN: llvm-spirv --spirv-debug-info-version=nonsemantic-shader-100 %t.bc -spirv-text -o %t.spt
5 ; RUN: FileCheck %s --input-file %t.spt --check-prefix CHECK-SPIRV
6 ; RUN: llvm-spirv --spirv-debug-info-version=nonsemantic-shader-100 %t.bc -o %t.spv
7 ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
8 ; RUN: FileCheck %s --input-file %t.ll --check-prefix CHECK-LLVM
9
10 ; RUN: llvm-spirv --spirv-debug-info-version=nonsemantic-shader-200 %t.bc -spirv-text -o %t.spt
11 ; RUN: FileCheck %s --input-file %t.spt --check-prefix CHECK-SPIRV
12 ; RUN: llvm-spirv --spirv-debug-info-version=nonsemantic-shader-200 %t.bc -o %t.spv
13 ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
14 ; RUN: FileCheck %s --input-file %t.ll --check-prefix CHECK-LLVM
15
16 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
17 target triple = "spir64-unknown-unknown"
18
19 ; CHECK-SPIRV-DAG: ExtInstImport [[#EISId:]] "NonSemantic.Shader.DebugInfo
20 ; CHECK-SPIRV-DAG: String [[#Name:]] ""
21 ; CHECK-SPIRV-DAG: TypeInt [[#Int:]] 32 0
22 ; CHECK-SPIRV-DAG: Constant [[#Int]] [[#One:]] 1
23 ; CHECK-SPIRV-DAG: Constant [[#Int]] [[#Zero:]] 0
24 ; CHECK-SPIRV-DAG: Constant [[#Int]] [[#Five:]] 5
25 ; CHECK-SPIRV: ExtInst [[#]] [[#Source:]] [[#]] DebugSource
26 ; CHECK-SPIRV: ExtInst [[#]] [[#CU:]] [[#]] DebugCompilationUnit
27 ; CHECK-SPIRV: ExtInst [[#]] [[#Typedef:]] [[#]] DebugTypedef
28 ; CHECK-SPIRV: ExtInst [[#]] [[#]] [[#EISId]] DebugImportedEntity [[#Name]] [[#One]] [[#Source]] [[#Typedef]] [[#Five]] [[#Zero]] [[#CU]] {{$}}
29
30 ; CHECK-LLVM: ![[#CU:]] = distinct !DICompileUnit(language: DW_LANG_OpenCL, file: ![[#File:]],{{.*}}isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, imports: ![[#Import:]])
31 ; CHECK-LLVM: ![[#File]] = !DIFile(filename: "<stdin>", directory: "/llvm/tools/clang/test/Modules")
32 ; CHECK-LLVM: ![[#Import]] = !{![[#Entity:]]}
33 ; CHECK-LLVM: ![[#Entity]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: ![[#CU]], entity: ![[#Typedef:]], file: ![[#File]], line: 5)
34 ; CHECK-LLVM: ![[#Typedef]] = !DIDerivedType(tag: DW_TAG_typedef, name: "max_align_t", file: ![[#File]], baseType: ![[#]])
35 ; CHECK-LLVM: !DICompositeType(tag: DW_TAG_structure_type, file: ![[#File]], line: 5, size: 256, flags: DIFlagFwdDecl, elements: ![[#]], identifier: "_ZTS11max_align_t")
36
37 !llvm.dbg.cu = !{!0}
38 !llvm.module.flags = !{!6, !7}
39 !llvm.ident = !{!8}
40
41 !0 = distinct !DICompileUnit(language: DW_LANG_OpenCL, file: !1, producer: "LLVM version 3.7.0", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !3, sysroot: "/")
42 !1 = !DIFile(filename: "/llvm/tools/clang/test/Modules/<stdin>", directory: "/")
43 !2 = !{}
44 !3 = !{!4}
45 !4 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !9, file: !1, line: 5)
46 !6 = !{i32 2, !"Dwarf Version", i32 4}
47 !7 = !{i32 2, !"Debug Info Version", i32 3}
48 !8 = !{!"LLVM version 3.7.0"}
49 !9 = !DIDerivedType(tag: DW_TAG_typedef, name: "max_align_t", file: !1, baseType: !10)
50 !10 = !DICompositeType(tag: DW_TAG_structure_type, file: !1, line: 5, size: 256, flags: DIFlagFwdDecl, elements: !2, identifier: "_ZTS11max_align_t")