From d9b67edf5241a5a45f80f8c865c591bd7a80e3a2 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Sat, 27 Feb 2021 08:30:24 -0800 Subject: [PATCH] convenience functions to check for aggregate types --- src/Type.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Type.h b/src/Type.h index d3b200c7d8..05dbcddd1e 100644 --- a/src/Type.h +++ b/src/Type.h @@ -840,6 +840,14 @@ inline bool IsAggr(TypeTag tag) { return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD; } +inline bool IsAggr(const Type* t) + { + return IsAggr(t->Tag()); + } +inline bool IsAggr(const TypePtr& t) + { + return IsAggr(t->Tag()); + } // True if the given type tag corresponds to the error type. inline bool IsErrorType(TypeTag t) { return (t == TYPE_ERROR); }