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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index db442d131..5dd028182 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -969,6 +969,8 @@ void CPPSourceEmitter::_emitGetAtDefinition(const UnownedStringSlice& funcName,
IRType* srcType = funcType->getParamType(0);
+ emitSpecializedOperationDefinitionPreamble(specOp);
+
IRType* retType = specOp->returnType;
emitType(retType);
m_writer->emit("& ");
@@ -1046,6 +1048,8 @@ void CPPSourceEmitter::_emitConstructConvertDefinition(const UnownedStringSlice&
IRType* srcType = funcType->getParamType(1);
IRType* retType = specOp->returnType;
+ emitSpecializedOperationDefinitionPreamble(specOp);
+
emitType(retType);
writer->emit(" ");
writer->emit(funcName);
@@ -1112,6 +1116,8 @@ void CPPSourceEmitter::_emitConstructFromScalarDefinition(const UnownedStringSli
IRType* srcType = funcType->getParamType(1);
IRType* retType = specOp->returnType;
+ emitSpecializedOperationDefinitionPreamble(specOp);
+
emitType(retType);
writer->emit(" ");
writer->emit(funcName);