Skip to content

Commit 18bbc25

Browse files
committed
Handle kernel debug info indirection.
1 parent 12be066 commit 18bbc25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/SPIRV/SPIRVToLLVMDbgTran.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,11 @@ MDNode *SPIRVToLLVMDbgTran::transEntryPoint(const SPIRVExtInst *DebugInst) {
11011101
assert(Ops.size() == OperandCount && "Invalid number of operands");
11021102

11031103
SPIRVExtInst *EP = BM->get<SPIRVExtInst>(Ops[EntryPointIdx]);
1104+
// Handle cases where we get the trampoline / stub instead of an actual kernel
1105+
if (isNonSemanticDebugInfo(DebugInst->getExtSetKind()) &&
1106+
EP->getArguments().size() <
1107+
SPIRVDebug::Operand::Function::MinOperandCountNonSem)
1108+
EP = BM->get<SPIRVExtInst>(EP->getArguments().front());
11041109
SPIRVExtInst *CU = BM->get<SPIRVExtInst>(Ops[CompilationUnitIdx]);
11051110
std::string Producer = getString(Ops[CompilerSignatureIdx]);
11061111
std::string CLArgs = getString(Ops[CommandLineArgsIdx]);

0 commit comments

Comments
 (0)