summaryrefslogtreecommitdiffstats
path: root/include/datatype.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/datatype.h')
-rw-r--r--include/datatype.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/datatype.h b/include/datatype.h
index eab505ba..f7092f06 100644
--- a/include/datatype.h
+++ b/include/datatype.h
@@ -171,6 +171,12 @@ static inline bool datatype_equal(const struct datatype *d1,
return d1->type == d2->type;
}
+static inline const struct datatype *
+datatype_basetype(const struct datatype *dtype)
+{
+ return dtype->basetype ? dtype->basetype : dtype;
+}
+
/**
* struct symbolic_constant - symbol <-> constant mapping
*