From 2c8b983cf20ba662e351813f3f432b65eef3530c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 29 Jan 2020 10:06:45 -0500 Subject: Feature/fix cuda function preamble (#1187) * Fix tests/compute/global-init.slang by handling some other cases where functions are emitted. * Fix comment. --- source/slang/slang-emit-cpp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-emit-cpp.cpp') diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 759f980d3..99cc2f61c 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -808,7 +808,7 @@ void CPPSourceEmitter::_emitSignature(const UnownedStringSlice& funcName, const const int paramsCount = int(funcType->getParamCount()); IRType* retType = specOp->returnType; - emitSpecializedOperationDefinitionPreamble(specOp); + emitFunctionPreambleImpl(nullptr); SourceWriter* writer = getSourceWriter(); @@ -981,7 +981,7 @@ void CPPSourceEmitter::_emitGetAtDefinition(const UnownedStringSlice& funcName, { UnownedStringSlice typePrefix = (i == 0) ? UnownedStringSlice::fromLiteral("const ") : UnownedStringSlice(); - emitSpecializedOperationDefinitionPreamble(specOp); + emitFunctionPreambleImpl(nullptr); writer->emit(typePrefix); emitType(specOp->returnType); @@ -1075,7 +1075,7 @@ void CPPSourceEmitter::_emitConstructConvertDefinition(const UnownedStringSlice& IRType* srcType = funcType->getParamType(1); IRType* retType = specOp->returnType; - emitSpecializedOperationDefinitionPreamble(specOp); + emitFunctionPreambleImpl(nullptr); emitType(retType); writer->emit(" "); @@ -1143,7 +1143,7 @@ void CPPSourceEmitter::_emitConstructFromScalarDefinition(const UnownedStringSli IRType* srcType = funcType->getParamType(1); IRType* retType = specOp->returnType; - emitSpecializedOperationDefinitionPreamble(specOp); + emitFunctionPreambleImpl(nullptr); emitType(retType); writer->emit(" "); -- cgit v1.2.3