summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-09-10 15:10:11 -0700
committerGitHub <noreply@github.com>2020-09-10 15:10:11 -0700
commite5b796db188416dfc414dab27b92c86b0b53de2b (patch)
treeeab72001c550d80927805bd5462fb529c20170ae /source/slang/slang-emit-c-like.cpp
parentd6a2d2905125715629fe8972a374136189d0c9ef (diff)
Allow existential types in `StructuredBuffer` element type. (#1536)
* Allow existential types in `StructuredBuffer` element type. * Handle StructuredBuffer.Load/.Consume methods * Clean up unnecessary changes * Code cleanup * Update test comment
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 090d06f28..8ef18242a 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -222,7 +222,7 @@ void CLikeSourceEmitter::emitSimpleType(IRType* type)
List<IRWitnessTableEntry*> CLikeSourceEmitter::getSortedWitnessTableEntries(IRWitnessTable* witnessTable)
{
List<IRWitnessTableEntry*> sortedWitnessTableEntries;
- auto interfaceType = cast<IRInterfaceType>(witnessTable->getOperand(0));
+ auto interfaceType = cast<IRInterfaceType>(witnessTable->getConformanceType());
auto witnessTableItems = witnessTable->getChildren();
// Build a dictionary of witness table entries for fast lookup.
Dictionary<IRInst*, IRWitnessTableEntry*> witnessTableEntryDictionary;