diff options
Diffstat (limited to 'source/slang/slang-ir-lower-existential.cpp')
| -rw-r--r-- | source/slang/slang-ir-lower-existential.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/slang/slang-ir-lower-existential.cpp b/source/slang/slang-ir-lower-existential.cpp index 0dce96de2..a87169ac3 100644 --- a/source/slang/slang-ir-lower-existential.cpp +++ b/source/slang/slang-ir-lower-existential.cpp @@ -23,12 +23,13 @@ namespace Slang auto value = inst->getWrappedValue(); auto valueType = sharedContext->lowerType(builder, value->getDataType()); - auto witnessTableType = cast<IRWitnessTableType>(inst->getWitnessTable()->getDataType()); + auto witnessTableType = cast<IRWitnessTableTypeBase>(inst->getWitnessTable()->getDataType()); auto interfaceType = witnessTableType->getConformanceType(); + auto witnessTableIdType = builder->getWitnessTableIDType((IRType*)interfaceType); auto anyValueSize = sharedContext->getInterfaceAnyValueSize(interfaceType, inst->sourceLoc); auto anyValueType = builder->getAnyValueType(anyValueSize); - auto rttiType = builder->getPtrType(builder->getRTTIType()); - auto tupleType = builder->getTupleType(rttiType, witnessTableType, anyValueType); + auto rttiType = builder->getRTTIHandleType(); + auto tupleType = builder->getTupleType(rttiType, witnessTableIdType, anyValueType); IRInst* rttiObject = inst->getRTTI(); if (auto type = as<IRType>(rttiObject)) |
