diff options
| author | Yong He <yonghe@outlook.com> | 2020-09-10 15:10:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-10 15:10:11 -0700 |
| commit | e5b796db188416dfc414dab27b92c86b0b53de2b (patch) | |
| tree | eab72001c550d80927805bd5462fb529c20170ae /source/slang/slang-emit-cpp.cpp | |
| parent | d6a2d2905125715629fe8972a374136189d0c9ef (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-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 650b8aa8f..63cac961f 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -1606,7 +1606,7 @@ void CPPSourceEmitter::emitParamTypeImpl(IRType* type, String const& name) void CPPSourceEmitter::emitWitnessTable(IRWitnessTable* witnessTable) { - auto interfaceType = cast<IRInterfaceType>(witnessTable->getOperand(0)); + auto interfaceType = cast<IRInterfaceType>(witnessTable->getConformanceType()); // Ignore witness tables for builtin interface types. if (isBuiltin(interfaceType)) @@ -1634,7 +1634,7 @@ void CPPSourceEmitter::_emitWitnessTableDefinitions() { for (auto witnessTable : pendingWitnessTableDefinitions) { - auto interfaceType = cast<IRInterfaceType>(witnessTable->getOperand(0)); + auto interfaceType = cast<IRInterfaceType>(witnessTable->getConformanceType()); List<IRWitnessTableEntry*> sortedWitnessTableEntries = getSortedWitnessTableEntries(witnessTable); m_writer->emit("extern \"C\"\n{\n"); m_writer->indent(); |
