Merge pull request #3021 from qingyuanzNV/fix_opline_prepending_opfunction_with_pp
Fix OpLine prepending OpFunction reports wrong file when #line is pre…
This commit is contained in:
@@ -2865,7 +2865,9 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
}
|
||||
if (options.generateDebugInfo) {
|
||||
const auto& loc = node->getLoc();
|
||||
currentFunction->setDebugLineInfo(builder.getSourceFile(), loc.line, loc.column);
|
||||
const char* sourceFileName = loc.getFilename();
|
||||
spv::Id sourceFileId = sourceFileName ? builder.getStringId(sourceFileName) : builder.getSourceFile();
|
||||
currentFunction->setDebugLineInfo(sourceFileId, loc.line, loc.column);
|
||||
}
|
||||
} else {
|
||||
if (inEntryPoint)
|
||||
|
||||
Reference in New Issue
Block a user