public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ken Matsui <kmatsui@gcc.gnu.org>
To: gcc-patches@gcc.gnu.org
Cc: Ken Matsui <kmatsui@gcc.gnu.org>
Subject: [PATCH 4/8] c++, tree: Move INDIRECT_TYPE_P to tree.h
Date: Tue, 18 Jul 2023 16:12:46 -0700	[thread overview]
Message-ID: <20230718233301.28677-5-kmatsui@gcc.gnu.org> (raw)
In-Reply-To: <20230718233301.28677-1-kmatsui@gcc.gnu.org>

This patch moves INDIRECT_TYPE_P from cp/cp-tree.h to tree.h to unify
POINTER_TYPE_P in tree.h to INDIRECT_TYPE_P, which are equivalent.

gcc/cp/ChangeLog:

	* cp-tree.h (INDIRECT_TYPE_P): Remove.

gcc/ChangeLog:

	* tree.h (INDIRECT_TYPE_P): Define.

Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
---
 gcc/cp/cp-tree.h | 4 ----
 gcc/tree.h       | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 681aa95e57f..5236b168ecc 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4706,10 +4706,6 @@ get_vec_init_expr (tree t)
 #define TYPE_PTRDATAMEM_P(NODE)			\
   (TREE_CODE (NODE) == OFFSET_TYPE)
 
-/* Returns true if NODE is a pointer or a reference.  */
-#define INDIRECT_TYPE_P(NODE)			\
-  (TYPE_PTR_P (NODE) || TYPE_REF_P (NODE))
-
 /* Returns true if NODE is an object type:
 
      [basic.types]
diff --git a/gcc/tree.h b/gcc/tree.h
index 48d57764d9c..c369b8470ab 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -686,6 +686,11 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define TYPE_REF_P(NODE)			\
   (TREE_CODE (NODE) == REFERENCE_TYPE)
 
+/* Nonzero if TYPE represents a pointer or reference type.
+   Keep these checks in ascending code order.  */
+#define INDIRECT_TYPE_P(NODE)			\
+  (TYPE_PTR_P (NODE) || TYPE_REF_P (NODE))
+
 /* Nonzero if TYPE represents a pointer or reference type.
    (It should be renamed to INDIRECT_TYPE_P.)  Keep these checks in
    ascending code order.  */
-- 
2.41.0


  parent reply	other threads:[~2023-07-18 23:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 23:12 [PATCH 0/8] Tweak predicate macros in tree Ken Matsui
2023-07-18 23:12 ` [PATCH 1/8] c++, tree: Move TYPE_REF_P to tree.h Ken Matsui
2023-07-18 23:12 ` [PATCH 2/8] gcc: Use TYPE_REF_P Ken Matsui
2023-07-18 23:12 ` [PATCH 3/8] c++, tree: Move TYPE_PTR_P to tree.h Ken Matsui
2023-07-18 23:12 ` Ken Matsui [this message]
2023-07-18 23:12 ` [PATCH 5/8] gcc: Use INDIRECT_TYPE_P instead of POINTER_TYPE_P Ken Matsui
2023-07-18 23:12 ` [PATCH 6/8] tree: Remove POINTER_TYPE_P Ken Matsui
2023-07-18 23:12 ` [PATCH 7/8] tree: Define TYPE_REF_IS_LVALUE Ken Matsui
2023-07-18 23:12 ` [PATCH 8/8] c++, lto: Use TYPE_REF_IS_LVALUE Ken Matsui
2023-07-19  7:07 ` [PATCH 0/8] Tweak predicate macros in tree Richard Biener
2023-07-19 17:27   ` Ken Matsui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230718233301.28677-5-kmatsui@gcc.gnu.org \
    --to=kmatsui@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).