From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 5/6] gdb: remove TYPE_RVALUE_REFERENCE_TYPE
Date: Mon, 16 Mar 2026 10:25:22 -0400 [thread overview]
Message-ID: <20260316142645.26877-6-simon.marchi@efficios.com> (raw)
In-Reply-To: <20260316142645.26877-1-simon.marchi@efficios.com>
From: Simon Marchi <simon.marchi@polymtl.ca>
IMO, there is no point in keeping this macro. Remove it and access the
field directly. If we ever want some kind of abstraction in front of
the field, then we'll add a method.
Change-Id: Ic1e6ee65f7fda78a40e935b1e6a8e3b7ab5540fb
---
gdb/gdbtypes.c | 4 ++--
gdb/gdbtypes.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index feea1e9333be..a32dcfb56991 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -419,7 +419,7 @@ make_reference_type (type *type, type_code refcode)
gdb_assert (refcode == TYPE_CODE_REF || refcode == TYPE_CODE_RVALUE_REF);
ntype = (refcode == TYPE_CODE_REF ? type->reference_type
- : TYPE_RVALUE_REFERENCE_TYPE (type));
+ : type->rvalue_reference_type);
if (ntype)
return ntype;
@@ -427,7 +427,7 @@ make_reference_type (type *type, type_code refcode)
ntype = type_allocator (type).new_type ();
ntype->set_target_type (type);
reftype = (refcode == TYPE_CODE_REF ? &type->reference_type
- : &TYPE_RVALUE_REFERENCE_TYPE (type));
+ : &type->rvalue_reference_type);
*reftype = ntype;
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index e241da402808..afca3c9f6368 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1897,7 +1897,6 @@ extern void allocate_gnat_aux_type (struct type *);
(TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FIXED_POINT, \
allocate_fixed_point_type_info (type))
-#define TYPE_RVALUE_REFERENCE_TYPE(thistype) (thistype)->rvalue_reference_type
#define TYPE_CHAIN(thistype) (thistype)->chain
/* * Return the alignment of the type in target addressable memory
--
2.53.0
next prev parent reply other threads:[~2026-03-16 14:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 14:25 [PATCH 0/6] Remove some trivial TYPE_* macros Simon Marchi
2026-03-16 14:25 ` [PATCH 1/6] gdb: remove INIT_NONE_SPECIFIC Simon Marchi
2026-03-16 14:25 ` [PATCH 2/6] gdb: remove TYPE_MAIN_TYPE Simon Marchi
2026-03-16 14:25 ` [PATCH 3/6] gdb: remove TYPE_POINTER_TYPE Simon Marchi
2026-03-16 14:25 ` [PATCH 4/6] gdb: remove TYPE_REFERENCE_TYPE Simon Marchi
2026-03-16 14:25 ` Simon Marchi [this message]
2026-03-16 14:25 ` [PATCH 6/6] gdb: remove TYPE_CHAIN Simon Marchi
2026-03-16 17:16 ` [PATCH 0/6] Remove some trivial TYPE_* macros Andrew Burgess
2026-03-16 17:28 ` Simon Marchi
2026-03-19 14:34 ` 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=20260316142645.26877-6-simon.marchi@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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