File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1310,13 +1310,14 @@ SPIRVEntry *LLVMToSPIRVDbgTran::transDbgFunction(const DISubprogram *Func) {
1310
1310
if (DISubprogram *FuncDecl = Func->getDeclaration ())
1311
1311
Ops.push_back (transDbgEntry (FuncDecl)->getId ());
1312
1312
else {
1313
- Ops.push_back (getDebugInfoNoneId ());
1314
1313
if (BM->getDebugInfoEIS () == SPIRVEIS_NonSemantic_Shader_DebugInfo_200) {
1315
1314
// Translate targetFuncName mostly for Fortran trampoline function if it
1316
1315
// is the case
1317
1316
StringRef TargetFunc = Func->getTargetFuncName ();
1318
- if (!TargetFunc.empty ())
1317
+ if (!TargetFunc.empty ()) {
1318
+ Ops.push_back (getDebugInfoNoneId ());
1319
1319
Ops.push_back (BM->getString (TargetFunc.str ())->getId ());
1320
+ }
1320
1321
}
1321
1322
}
1322
1323
Original file line number Diff line number Diff line change 5
5
// even if in LLVM IR it points to a DIFile instead of DICompileUnit.
6
6
7
7
// RUN: %clang_cc1 %s -cl-std=clc++ -emit-llvm-bc -triple spir -debug-info-kind=line-tables-only -O0 -o - | llvm-spirv -o %t.spv
8
+ // RUN: spirv-val %t.spv
8
9
// RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
9
10
// RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM
10
11
@@ -18,8 +19,8 @@ void kernel k() {
18
19
// CHECK-SPIRV: String [[foo:[0-9]+]] "foo"
19
20
// CHECK-SPIRV: String [[k:[0-9]+]] "k"
20
21
// CHECK-SPIRV: [[CU:[0-9]+]] {{[0-9]+}} DebugCompilationUnit
21
- // CHECK-SPIRV: DebugFunction [[foo]] {{.*}} [[CU]] {{.*}} [[foo_id:[0-9]+]] {{[0-9]+}} {{ $}}
22
- // CHECK-SPIRV: DebugFunction [[k]] {{.*}} [[CU]] {{.*}} [[k_id:[0-9]+]] {{[0-9]+}} {{ $}}
22
+ // CHECK-SPIRV: DebugFunction [[foo]] {{.*}} [[CU]] {{.*}} [[foo_id:[0-9]+]] {{$}}
23
+ // CHECK-SPIRV: DebugFunction [[k]] {{.*}} [[CU]] {{.*}} [[k_id:[0-9]+]] {{$}}
23
24
24
25
// CHECK-SPIRV: Function {{[0-9]+}} [[foo_id]]
25
26
// CHECK-LLVM: define spir_func float @_Z3fooi(i32 %i) #{{[0-9]+}} !dbg !{{[0-9]+}} {
You can’t perform that action at this time.
0 commit comments