Skip to content

Commit 3ae57d5

Browse files
authored
Merge pull request #11 from ROCm/alexv/wip_dbg_fix
[WIP] Handle DI translation for wrapper entrypoints
2 parents bbc750e + a74cbdd commit 3ae57d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SPIRV/SPIRVToLLVMDbgTran.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,10 @@ 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+
if (isNonSemanticDebugInfo(DebugInst->getExtSetKind()) &&
1105+
EP->getArguments().size() <
1106+
SPIRVDebug::Operand::Function::MinOperandCountNonSem)
1107+
EP = BM->get<SPIRVExtInst>(EP->getArguments().front());
11041108
SPIRVExtInst *CU = BM->get<SPIRVExtInst>(Ops[CompilationUnitIdx]);
11051109
std::string Producer = getString(Ops[CompilerSignatureIdx]);
11061110
std::string CLArgs = getString(Ops[CommandLineArgsIdx]);

0 commit comments

Comments
 (0)