summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-01-29 10:06:45 -0500
committerGitHub <noreply@github.com>2020-01-29 10:06:45 -0500
commit2c8b983cf20ba662e351813f3f432b65eef3530c (patch)
tree61ee43c2d1db218f8f9deb91a83a7cee1a4340e7 /source/slang/slang-emit-cpp.cpp
parent58cea79d8622a08b0887dbfda8f8042e42679c8f (diff)
Feature/fix cuda function preamble (#1187)
* Fix tests/compute/global-init.slang by handling some other cases where functions are emitted. * Fix comment.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
-rw-r--r--source/slang/slang-emit-cpp.cpp8
1 files changed, 4 insertions, 4 deletions
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(" ");