From 7bc6a9ffaa55bd7593fe04984a46e2dc8f7175b5 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 12 May 1998 07:27:15 +0000 Subject: cp-tree.h (CANONICAL_TYPE_VARIANT): New macro. * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro. * method.c (build_mangled_name): Use it. (build_decl_overload_real): Likewise. From-SVN: r19695 --- gcc/cp/cp-tree.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/cp/cp-tree.h') 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) -- cgit v1.1