diff options
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 31f09e400..b52407412 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -522,6 +522,14 @@ SlangResult CPPSourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, S out << "*"; return SLANG_OK; } + case kIROp_NativePtrType: + case kIROp_PtrType: + { + auto elementType = (IRType*)type->getOperand(0); + SLANG_RETURN_ON_FAIL(calcTypeName(elementType, target, out)); + out << "*"; + return SLANG_OK; + } case kIROp_RTTIType: { out << "TypeInfo"; |
