summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 08caedb94..77c45a6d9 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -1619,7 +1619,7 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst)
auto ptrType = load->getPtr()->getDataType();
if (load->getPtr()->getOp() == kIROp_GlobalParam)
{
- if (ptrType->getOp() == kIROp_ConstRefType)
+ if (ptrType->getOp() == kIROp_BorrowInParamType)
return true;
if (auto ptrTypeBase = as<IRPtrTypeBase>(ptrType))
{
@@ -3879,24 +3879,24 @@ void CLikeSourceEmitter::emitParamTypeImpl(IRType* type, String const& name)
// encoded as a parameter of pointer type, so
// we need to decode that here.
//
- if (auto outType = as<IROutType>(type))
+ if (auto outType = as<IROutParamType>(type))
{
m_writer->emit("out ");
type = outType->getValueType();
}
- else if (auto inOutType = as<IRInOutType>(type))
+ else if (auto inOutType = as<IRBorrowInOutParamType>(type))
{
m_writer->emit("inout ");
type = inOutType->getValueType();
}
- else if (auto refType = as<IRRefType>(type))
+ else if (auto refType = as<IRRefParamType>(type))
{
// Note: There is no HLSL/GLSL equivalent for by-reference parameters,
// so we don't actually expect to encounter these in user code.
m_writer->emit("inout ");
type = refType->getValueType();
}
- else if (auto constRefType = as<IRConstRefType>(type))
+ else if (auto constRefType = as<IRBorrowInParamType>(type))
{
type = constRefType->getValueType();
}
@@ -4948,7 +4948,7 @@ void CLikeSourceEmitter::emitGlobalParam(IRGlobalParam* varDecl)
varType = ptrType->getValueType();
break;
default:
- if (as<IROutTypeBase>(ptrType))
+ if (as<IROutParamTypeBase>(ptrType))
varType = ptrType->getValueType();
break;
}