|
| 1 | +; ModuleID = '/Volumes/Data/apple-internal/llvm/tools/clang/test/Modules/debug-info-moduleimport.m' |
| 2 | +; RUN: llvm-as < %s -o %t.bc |
| 3 | +; RUN: llvm-spirv --spirv-ext=+SPV_INTEL_debug_module %t.bc -o %t.spv |
| 4 | +; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll |
| 5 | + |
| 6 | +; RUN: llc -mtriple=x86_64-apple-macosx %t.ll -accel-tables=Dwarf -o %t -filetype=obj |
| 7 | +; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s |
| 8 | +; RUN: llvm-dwarfdump -verify %t |
| 9 | + |
| 10 | +; RUN: llvm-spirv --spirv-ext=+SPV_INTEL_debug_module %t.bc -spirv-text -o - | FileCheck %s --check-prefix CHECK-SPIRV |
| 11 | + |
| 12 | +; CHECK: DW_TAG_compile_unit |
| 13 | +; CHECK-NOT: DW_TAG |
| 14 | +; CHECK: DW_TAG_module |
| 15 | +; CHECK-NEXT: DW_AT_name {{.*}}"DebugModule" |
| 16 | +; CHECK-NEXT: DW_AT_LLVM_config_macros {{.*}}"-DMODULES=0" |
| 17 | +; CHECK-NEXT: DW_AT_LLVM_include_path {{.*}}"/llvm/tools/clang/test/Modules/Inputs" |
| 18 | +; CHECK-NEXT: DW_AT_LLVM_apinotes {{.*}}"m.apinotes" |
| 19 | + |
| 20 | +; CHECK-SPIRV: Capability DebugInfoModuleINTEL |
| 21 | +; CHECK-SPIRV: Extension "SPV_INTEL_debug_module" |
| 22 | + |
| 23 | +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 24 | +target triple = "spir64-unknown-unknown" |
| 25 | + |
| 26 | +; CHECK-SPIRV: String [[FileName:[0-9]+]] "/llvm/tools/clang/test/Modules/<stdin>" |
| 27 | +; CHECK-SPIRV: String [[EmptyStr:[0-9]+]] "" |
| 28 | +; CHECK-SPIRV: String [[Name:[0-9]+]] "DebugModule" |
| 29 | +; CHECK-SPIRV: String [[Defines:[0-9]+]] "-DMODULES=0" |
| 30 | +; CHECK-SPIRV: String [[IncludePath:[0-9]+]] "/llvm/tools/clang/test/Modules/Inputs" |
| 31 | +; CHECK-SPIRV: String [[ApiNotes:[0-9]+]] "m.apinotes" |
| 32 | + |
| 33 | +; CHECK-SPIRV: ExtInst {{[0-9]+}} [[Module:[0-9]+]] {{[0-9]+}} DebugModuleINTEL [[Name]] {{[0-9]+}} 0 {{[0-9]+}} [[Defines]] [[IncludePath]] [[ApiNotes]] 0 |
| 34 | +; CHECK-SPIRV: ExtInst {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} DebugImportedEntity {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} [[Module]] |
| 35 | + |
| 36 | +!llvm.dbg.cu = !{!0} |
| 37 | +!llvm.module.flags = !{!6, !7} |
| 38 | +!llvm.ident = !{!8} |
| 39 | + |
| 40 | +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !1, producer: "LLVM version 3.7.0", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !3, sysroot: "/") |
| 41 | +!1 = !DIFile(filename: "/llvm/tools/clang/test/Modules/<stdin>", directory: "/") |
| 42 | +!2 = !{} |
| 43 | +!3 = !{!4} |
| 44 | +!4 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !5, file: !1, line: 5) |
| 45 | +!5 = !DIModule(scope: null, name: "DebugModule", configMacros: "-DMODULES=0", includePath: "/llvm/tools/clang/test/Modules/Inputs", apinotes: "m.apinotes") |
| 46 | +!6 = !{i32 2, !"Dwarf Version", i32 4} |
| 47 | +!7 = !{i32 2, !"Debug Info Version", i32 3} |
| 48 | +!8 = !{!"LLVM version 3.7.0"} |
0 commit comments