diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 11ea2e989..ce8834925 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -2325,7 +2325,15 @@ void CLikeSourceEmitter::emitInstStmt(IRInst* inst) void CLikeSourceEmitter::diagnoseUnhandledInst(IRInst* inst) { - getSink()->diagnose(inst, Diagnostics::unimplemented, "unexpected IR opcode during code emit"); + std::string message = "unexpected IR opcode during code emit"; + + if (inst) { + const IRDumpOptions dumpOptions{IRDumpOptions::Mode::Detailed, + IRDumpOptions::Flag::DumpDebugIds}; + message += ": " + dumpIRToString(inst, dumpOptions); + } + + getSink()->diagnose(inst, Diagnostics::unimplemented, message); } bool CLikeSourceEmitter::hasExplicitConstantBufferOffset(IRInst* cbufferType) |
