summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-10-07 00:30:10 -0700
committerGitHub <noreply@github.com>2020-10-07 00:30:10 -0700
commit55cd4210ecff75523699337704f7561f8c11a26e (patch)
tree5f205b93f7cc7da8f7e2ee315bd4f8ea11f90100 /source/slang/slang-emit-cpp.cpp
parent4ad2e52662a00f7d8b25be6d451bba33ba62947f (diff)
Fix C++ emit for `bit_cast` inst. (#1570)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
-rw-r--r--source/slang/slang-emit-cpp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index 1e2482bb5..6a82815a9 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -2238,9 +2238,9 @@ bool CPPSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOut
}
case kIROp_BitCast:
{
- m_writer->emit("((");
+ m_writer->emit("(slang_bit_cast<");
emitType(inst->getDataType());
- m_writer->emit(")(");
+ m_writer->emit(">(");
emitOperand(inst->getOperand(0), getInfo(EmitOp::General));
m_writer->emit("))");
return true;