From 049aac1b80143753b4b3449e529024bafe2250be Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 12 Jul 2022 22:45:05 -0700 Subject: Support `class` types. (#2321) * Support `class` types. * Ignore class-keyword test * Fix codereview comments and warnings. Co-authored-by: Yong He --- source/slang/slang-emit-cpp.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/slang/slang-emit-cpp.cpp') diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index b52407412..96b42af43 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -560,6 +560,13 @@ SlangResult CPPSourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, S out << ">"; return SLANG_OK; } + case kIROp_ClassType: + { + out << "RefPtr<"; + out << getName(type); + out << ">"; + return SLANG_OK; + } default: { if (isNominalOp(type->getOp())) -- cgit v1.2.3