Skip to content

Commit 8ed662a

Browse files
AlexVlxsearlmc1
authored andcommitted
Merge pull request #11 from ROCm/alexv/wip_dbg_fix
[WIP] Handle DI translation for wrapper entrypoints Change-Id: I1b1db95356fd67a811af4ae1b41016cb1f083873
1 parent b65ba24 commit 8ed662a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SPIRV/SPIRVToLLVMDbgTran.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,10 @@ MDNode *SPIRVToLLVMDbgTran::transEntryPoint(const SPIRVExtInst *DebugInst) {
10991099
assert(Ops.size() == OperandCount && "Invalid number of operands");
11001100

11011101
SPIRVExtInst *EP = BM->get<SPIRVExtInst>(Ops[EntryPointIdx]);
1102+
if (isNonSemanticDebugInfo(DebugInst->getExtSetKind()) &&
1103+
EP->getArguments().size() <
1104+
SPIRVDebug::Operand::Function::MinOperandCountNonSem)
1105+
EP = BM->get<SPIRVExtInst>(EP->getArguments().front());
11021106
SPIRVExtInst *CU = BM->get<SPIRVExtInst>(Ops[CompilationUnitIdx]);
11031107
std::string Producer = getString(Ops[CompilerSignatureIdx]);
11041108
std::string CLArgs = getString(Ops[CommandLineArgsIdx]);

0 commit comments

Comments
 (0)