public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>,
	 Keith Seitz <keiths@redhat.com>
Subject: [PATCH v3 5/9] Remove some QUIT calls from need_access_label_p
Date: Fri, 03 Nov 2023 10:09:27 -0600	[thread overview]
Message-ID: <20231103-field-bits-v3-5-273c40bcaf3d@adacore.com> (raw)
In-Reply-To: <20231103-field-bits-v3-0-273c40bcaf3d@adacore.com>

I think these invocations of QUIT in need_access_label_p are overkill.
QUIT is already called from its caller.  This just removes them.

Acked-By: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Keith Seitz <keiths@redhat.com>
---
 gdb/c-typeprint.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index e45098268c0..241fbca49b7 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -911,31 +911,25 @@ need_access_label_p (struct type *type)
 {
   if (type->is_declared_class ())
     {
-      QUIT;
       for (int i = TYPE_N_BASECLASSES (type); i < type->num_fields (); i++)
 	if (!TYPE_FIELD_PRIVATE (type, i))
 	  return true;
-      QUIT;
       for (int j = 0; j < TYPE_NFN_FIELDS (type); j++)
 	for (int i = 0; i < TYPE_FN_FIELDLIST_LENGTH (type, j); i++)
 	  if (!TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type,
 							  j), i))
 	    return true;
-      QUIT;
       for (int i = 0; i < TYPE_TYPEDEF_FIELD_COUNT (type); ++i)
 	if (!TYPE_TYPEDEF_FIELD_PRIVATE (type, i))
 	  return true;
     }
   else
     {
-      QUIT;
       for (int i = TYPE_N_BASECLASSES (type); i < type->num_fields (); i++)
 	if (TYPE_FIELD_PRIVATE (type, i) || TYPE_FIELD_PROTECTED (type, i))
 	  return true;
-      QUIT;
       for (int j = 0; j < TYPE_NFN_FIELDS (type); j++)
 	{
-	  QUIT;
 	  for (int i = 0; i < TYPE_FN_FIELDLIST_LENGTH (type, j); i++)
 	    if (TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1 (type,
 							     j), i)
@@ -944,7 +938,6 @@ need_access_label_p (struct type *type)
 					  i))
 	      return true;
 	}
-      QUIT;
       for (int i = 0; i < TYPE_TYPEDEF_FIELD_COUNT (type); ++i)
 	if (TYPE_TYPEDEF_FIELD_PROTECTED (type, i)
 	    || TYPE_TYPEDEF_FIELD_PRIVATE (type, i))

-- 
2.40.1


  parent reply	other threads:[~2023-11-03 16:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 16:09 [PATCH v3 0/9] Remove char-based bitfield macros Tom Tromey
2023-11-03 16:09 ` [PATCH v3 1/9] Use .def file to stringify type codes Tom Tromey
2023-11-03 16:09 ` [PATCH v3 2/9] Print field accessibility inline Tom Tromey
2023-11-03 16:09 ` [PATCH v3 3/9] Remove byte vectors from cplus_struct_type Tom Tromey
2023-11-03 16:09 ` [PATCH v3 4/9] Add field::is_public Tom Tromey
2023-11-03 16:09 ` Tom Tromey [this message]
2023-11-03 16:09 ` [PATCH v3 6/9] Remove some type field accessor macros Tom Tromey
2023-11-03 16:09 ` [PATCH v3 7/9] Remove char-based bitfield macros Tom Tromey
2023-11-03 16:09 ` [PATCH v3 8/9] Use enum accessibility in types and member functions Tom Tromey
2023-11-22  9:46   ` Tom de Vries
2023-11-22 13:54     ` Tom Tromey
2023-11-22 14:03       ` Tom Tromey
2023-11-03 16:09 ` [PATCH v3 9/9] Simplify C++ type-printing Tom Tromey
2023-11-21 21:52 ` [PATCH v3 0/9] Remove char-based bitfield macros Tom Tromey

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=20231103-field-bits-v3-5-273c40bcaf3d@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=simon.marchi@efficios.com \
    /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).