summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 2f0b0b035..582f5e445 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -309,6 +309,14 @@ void CLikeSourceEmitter::emitInterface(IRInterfaceType* interfaceType)
// This behavior is overloaded by concrete emitters.
}
+void CLikeSourceEmitter::emitRTTIObject(IRRTTIObject* rttiObject)
+{
+ SLANG_UNUSED(rttiObject);
+ // Ignore rtti object by default.
+ // This is only used in targets that support dynamic dispatching.
+}
+
+
void CLikeSourceEmitter::emitTypeImpl(IRType* type, const StringSliceLoc* nameAndLoc)
{
if (nameAndLoc)
@@ -908,6 +916,7 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst)
case kIROp_GlobalParam:
case kIROp_Param:
case kIROp_Func:
+ case kIROp_Alloca:
return false;
// Always fold these in, because they are trivial
@@ -2010,6 +2019,8 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
/* Don't need to to output anything for this instruction - it's used for reflecting string literals that
are hashed with 'getStringHash' */
break;
+ case kIROp_RTTIPointerType:
+ break;
case kIROp_undefined:
m_writer->emit(getName(inst));
@@ -3674,6 +3685,10 @@ void CLikeSourceEmitter::emitGlobalInst(IRInst* inst)
emitWitnessTable(cast<IRWitnessTable>(inst));
break;
+ case kIROp_RTTIObject:
+ emitRTTIObject(cast<IRRTTIObject>(inst));
+ break;
+
default:
// We have an "ordinary" instruction at the global
// scope, and we should therefore emit it using the