diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index e76c85b..d02c7e7 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -596,6 +596,14 @@ struct lang_type #define TYPE_HAS_ASSIGNMENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_assignment) #define TYPE_HAS_REAL_ASSIGNMENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_real_assignment) +/* Returns the canonical version of TYPE. In other words, if TYPE is + a typedef, returns the underlying type. The cv-qualification of + the type returned matches the type input; they will always be + compatible types. */ +#define CANONICAL_TYPE_VARIANT(NODE) \ + (cp_build_type_variant (TYPE_MAIN_VARIANT (NODE), \ + TYPE_READONLY (NODE), TYPE_VOLATILE (NODE))) + /* Nonzero for _CLASSTYPE means that operator new and delete are defined, respectively. */ #define TYPE_GETS_NEW(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_new) |