summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
-rw-r--r--source/slang/slang-emit-cpp.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index 81bc2203a..ebe5965f4 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -403,8 +403,9 @@ void CPPSourceEmitter::useType(IRType* type)
break;
}
case kIROp_RefType:
+ case kIROp_ConstRefType:
{
- type = static_cast<IRRefType*>(type)->getValueType();
+ type = static_cast<IRPtrTypeBase*>(type)->getValueType();
break;
}
default: break;
@@ -1039,6 +1040,7 @@ void CPPSourceEmitter::_emitType(IRType* type, DeclaratorInfo* declarator)
}
break;
case kIROp_RefType:
+ case kIROp_ConstRefType:
{
auto ptrType = cast<IRPtrTypeBase>(type);
PtrDeclaratorInfo refDeclarator(declarator);