generate OpLine before OpFunction

This commit is contained in:
Qingyuan Zheng
2022-05-23 23:05:43 -07:00
parent 86ff4bca1d
commit 279c28e70a
13 changed files with 42 additions and 1 deletions

View File

@@ -2783,6 +2783,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
} else {
handleFunctionEntry(node);
}
if (options.generateDebugInfo) {
const auto& loc = node->getLoc();
currentFunction->setDebugLineInfo(builder.getSourceFile(), loc.line, loc.column);
}
} else {
if (inEntryPoint)
entryPointTerminated = true;