Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] gdb: simplify code in check_typedef
@ 2026-07-27  9:20 Tankut Baris Aktemur
  2026-07-27  9:20 ` [PATCH 2/2] gdb: preserve lhs type's address spaces/classes " Tankut Baris Aktemur
  2026-07-29 17:27 ` [PATCH 1/2] gdb: simplify code " Keith Seitz
  0 siblings, 2 replies; 3+ messages in thread
From: Tankut Baris Aktemur @ 2026-07-27  9:20 UTC (permalink / raw)
  To: gdb-patches; +Cc: keiths, tom

Simplify a code portion in check_typedef where the conditions are
unnecessary.  Also remove the comment that says "treat address spaces
and address classes separately", because since the commit 92fdad7
"gdb: convert type instance flags to bitfields", they are separate
fields; so, the comment does not look useful.
---
 gdb/gdbtypes.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 9098727959e..ad401872941 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -3062,12 +3062,8 @@ check_typedef (struct type *type)
 	 "it can't happen".  */
       {
 	type_instance_flags new_instance_flags = type->instance_flags ();
-
-	/* Treat code vs data spaces and address classes separately.  */
-	if (instance_flags.harvard_aspace != HARVARD_ASPACE_NONE)
-	  new_instance_flags.harvard_aspace = HARVARD_ASPACE_NONE;
-	if (instance_flags.address_class != 0)
-	  new_instance_flags.address_class = 0;
+	new_instance_flags.harvard_aspace = HARVARD_ASPACE_NONE;
+	new_instance_flags.address_class = 0;
 
 	instance_flags |= new_instance_flags;
       }
-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-29 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-27  9:20 [PATCH 1/2] gdb: simplify code in check_typedef Tankut Baris Aktemur
2026-07-27  9:20 ` [PATCH 2/2] gdb: preserve lhs type's address spaces/classes " Tankut Baris Aktemur
2026-07-29 17:27 ` [PATCH 1/2] gdb: simplify code " Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox