diff options
Diffstat (limited to 'source/slang/ir.cpp')
| -rw-r--r-- | source/slang/ir.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp index 598445fcd..eb78d144e 100644 --- a/source/slang/ir.cpp +++ b/source/slang/ir.cpp @@ -3109,24 +3109,7 @@ namespace Slang RefPtr<Type> IRSpecContext::maybeCloneType(Type* originalType) { - auto rsType = originalType->GetCanonicalType()->Substitute(subst).As<Type>(); - if (auto declRefType = rsType.As<DeclRefType>()) - { - if (subst) - { - auto newSubst = cloneSubstitutions(this, subst); - insertSubstAtBottom(declRefType->declRef.substitutions, newSubst); - } - } - else if (auto funcType = rsType.As<FuncType>()) - { - RefPtr<FuncType> newFuncType = new FuncType(); - newFuncType->setSession(funcType->getSession()); - newFuncType->resultType = maybeCloneType(funcType->resultType); - for (auto paramType : funcType->paramTypes) - newFuncType->paramTypes.Add(maybeCloneType(paramType)); - } - return rsType; + return originalType->Substitute(subst).As<Type>(); } IRValue* IRSpecContext::maybeCloneValue(IRValue* originalValue) |
