summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-08-28 09:04:55 -0700
committerGitHub <noreply@github.com>2020-08-28 09:04:55 -0700
commitab5b0a7f9fbc47f7c51a7ec4a20ac0be55333e93 (patch)
treeabeb62d38f2af31e39a6dac216bc77e88af8ffbc /source/slang/slang-emit-cpp.cpp
parente9bf8de3123563df6f2ca4d3b99291c6a8c99d5d (diff)
Enable lower-generics pass universally. (#1518)
* Enable lower-generics pass universally. * Exclude builtin interfaces and functions from lower-generics pass. * Update stdlib. * Fixup. * Fixes handling of nested intrinsic generic functions. * Fixes. * Fixes.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
-rw-r--r--source/slang/slang-emit-cpp.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index e7c90f657..1f40a2640 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -1607,6 +1607,11 @@ void CPPSourceEmitter::emitParamTypeImpl(IRType* type, String const& name)
void CPPSourceEmitter::emitWitnessTable(IRWitnessTable* witnessTable)
{
auto interfaceType = cast<IRInterfaceType>(witnessTable->getOperand(0));
+
+ // Ignore witness tables for builtin interface types.
+ if (isBuiltin(interfaceType))
+ return;
+
auto witnessTableItems = witnessTable->getChildren();
_maybeEmitWitnessTableTypeDefinition(interfaceType);