summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-03 12:08:37 -0700
committerGitHub <noreply@github.com>2022-08-03 12:08:37 -0700
commite81a5fe56f3177fc3c7040e2320ae083e3746eb7 (patch)
tree884c15287bc10050e7883897dd266b27e62bff66 /source/slang/slang-ir-util.cpp
parent260fc5fbe58f2cf976d64993054c638769bc280f (diff)
Basic pointer usages. (#2342)
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index a515217d9..d91252fcc 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -38,4 +38,9 @@ bool isPtrToClassType(IRInst* type)
return isPointerOfType(type, kIROp_ClassType);
}
+bool isPtrToArrayType(IRInst* type)
+{
+ return isPointerOfType(type, kIROp_ArrayType) || isPointerOfType(type, kIROp_UnsizedArrayType);
+}
+
}