[1/8] c++, tree: Move TYPE_REF_P to tree.h
Checks
Commit Message
This patch moves TYPE_REF_P from cp/cp-tree.h to tree.h to simplify the
same code as it and to declare TYPE_REF_IS_LVALUE that determines if a
type is a C++ lvalue reference.
gcc/cp/ChangeLog:
* cp-tree.h (TYPE_REF_P): Remove.
gcc/ChangeLog:
* tree.h (TYPE_REF_P): Define.
Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
---
gcc/cp/cp-tree.h | 4 ----
gcc/tree.h | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
@@ -4710,10 +4710,6 @@ get_vec_init_expr (tree t)
#define TYPE_PTR_P(NODE) \
(TREE_CODE (NODE) == POINTER_TYPE)
-/* Returns true if NODE is a reference. */
-#define TYPE_REF_P(NODE) \
- (TREE_CODE (NODE) == REFERENCE_TYPE)
-
/* Returns true if NODE is a pointer or a reference. */
#define INDIRECT_TYPE_P(NODE) \
(TYPE_PTR_P (NODE) || TYPE_REF_P (NODE))
@@ -678,6 +678,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
#define AGGREGATE_TYPE_P(TYPE) \
(TREE_CODE (TYPE) == ARRAY_TYPE || RECORD_OR_UNION_TYPE_P (TYPE))
+/* Nonzero if this type is a reference. */
+#define TYPE_REF_P(NODE) \
+ (TREE_CODE (NODE) == REFERENCE_TYPE)
+
/* Nonzero if TYPE represents a pointer or reference type.
(It should be renamed to INDIRECT_TYPE_P.) Keep these checks in
ascending code order. */