[PATCH 1/2] gdb: simplify code in check_typedef
Tankut Baris Aktemur <[email protected]> Mon, 27 Jul 2026 09:20:00 +0000
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
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