summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-link.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
-rw-r--r--source/slang/slang-ir-link.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp
index 14e79560e..f57919e44 100644
--- a/source/slang/slang-ir-link.cpp
+++ b/source/slang/slang-ir-link.cpp
@@ -1198,10 +1198,11 @@ IRInst* cloneInst(
IRInst* clonedArg = cloneValue(context, originalArg);
newArgs[aa] = clonedArg;
}
+ auto funcType = cloneType(context, originalInst->getFullType());
context->builder = oldBuilder;
IRInst* clonedInst = builder->createIntrinsicInst(
- cloneType(context, originalInst->getFullType()),
+ funcType,
originalInst->getOp(),
argCount, newArgs.getArrayView().getBuffer());
builder->addInst(clonedInst);