diff options
Diffstat (limited to 'source/slang/slang-ir-specialize.cpp')
| -rw-r--r-- | source/slang/slang-ir-specialize.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/slang/slang-ir-specialize.cpp b/source/slang/slang-ir-specialize.cpp index 3f75a8b32..b82daa9a4 100644 --- a/source/slang/slang-ir-specialize.cpp +++ b/source/slang/slang-ir-specialize.cpp @@ -2080,11 +2080,16 @@ struct SpecializationContext baseElementType, slotOperandCount, type->getExistentialArgs()); - - auto newPtrLikeType = builder.getType( + // Create a new type inst where the first operand is replaced + // with wrappedElementType. + ShortList<IRInst*> operands; + operands.add(wrappedElementType); + for (UInt i = 1; i < baseType->getOperandCount(); i++) + operands.add(baseType->getOperand(i)); + IRInst* newPtrLikeType = builder.getType( baseType->getOp(), - 1, - &wrappedElementType); + operands.getCount(), + operands.getArrayView().getBuffer()); addUsersToWorkList(type); addToWorkList(newPtrLikeType); addToWorkList(wrappedElementType); |
