From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 5/7] Remove some QUIT calls from need_access_label_p
Date: Thu, 21 Sep 2023 12:01:32 -0600 [thread overview]
Message-ID: <20230921-field-bits-v1-5-201285360900@adacore.com> (raw)
In-Reply-To: <20230921-field-bits-v1-0-201285360900@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.
---
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
next prev parent reply other threads:[~2023-09-21 18:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 18:01 [PATCH 0/7] Remove char-based bitfield macros Tom Tromey via Gdb-patches
2023-09-21 18:01 ` [PATCH 1/7] Use .def file to stringify type codes Tom Tromey via Gdb-patches
2023-09-25 21:58 ` Lancelot SIX via Gdb-patches
2023-09-26 13:10 ` Tom Tromey via Gdb-patches
2023-09-21 18:01 ` [PATCH 2/7] Print field accessibility inline Tom Tromey via Gdb-patches
2023-09-21 18:01 ` [PATCH 3/7] Remove byte vectors from cplus_struct_type Tom Tromey via Gdb-patches
2023-09-25 22:32 ` Lancelot SIX via Gdb-patches
2023-10-27 14:20 ` Tom Tromey
2023-09-21 18:01 ` [PATCH 4/7] Add field::is_public Tom Tromey via Gdb-patches
2023-09-21 18:01 ` Tom Tromey via Gdb-patches [this message]
2023-09-21 18:01 ` [PATCH 6/7] Remove some type field accessor macros Tom Tromey via Gdb-patches
2023-09-21 18:01 ` [PATCH 7/7] Remove char-based bitfield macros Tom Tromey via Gdb-patches
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=20230921-field-bits-v1-5-201285360900@adacore.com \
--to=gdb-patches@sourceware.org \
--cc=tromey@adacore.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