summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index af6fd8ac4..942c8f2f8 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -364,6 +364,8 @@ bool canAddressesPotentiallyAlias(IRGlobalValueWithCode* func, IRInst* addr1, IR
bool isPtrLikeOrHandleType(IRInst* type)
{
+ if (!type)
+ return false;
switch (type->getOp())
{
case kIROp_ComPtrType:
@@ -413,6 +415,7 @@ bool canInstHaveSideEffectAtAddress(IRGlobalValueWithCode* func, IRInst* inst, I
// If any pointer typed argument of the call inst may overlap addr, return true.
for (UInt i = 0; i < call->getArgCount(); i++)
{
+ SLANG_RELEASE_ASSERT(call->getArg(i)->getDataType());
if (isPtrLikeOrHandleType(call->getArg(i)->getDataType()))
{
if (canAddressesPotentiallyAlias(func, call->getArg(i), addr))