From 55cd4210ecff75523699337704f7561f8c11a26e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 7 Oct 2020 00:30:10 -0700 Subject: Fix C++ emit for `bit_cast` inst. (#1570) Co-authored-by: Yong He --- source/slang/slang-emit-cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') 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; -- cgit v1.2.3