public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Add accessors to HIR::StructPatternFieldIdentPat
@ 2023-05-02 7:11 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-05-02 7:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8b6d44ad421a3fa886528173abffa91756c5789c
commit 8b6d44ad421a3fa886528173abffa91756c5789c
Author: Owen Avery <powerboat9.gamer@gmail.com>
Date: Wed Apr 26 16:33:07 2023 -0400
Add accessors to HIR::StructPatternFieldIdentPat
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h
(StructPatternFieldIdentPat::get_identifier): New.
(StructPatternFieldIdentPat::get_pattern): New.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diff:
---
gcc/rust/hir/tree/rust-hir-pattern.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h
index cb95f40d2d8..26337740a15 100644
--- a/gcc/rust/hir/tree/rust-hir-pattern.h
+++ b/gcc/rust/hir/tree/rust-hir-pattern.h
@@ -631,6 +631,10 @@ public:
ItemType get_item_type () const override final { return ItemType::IDENT_PAT; }
+ Identifier get_identifier () const { return ident; }
+
+ std::unique_ptr<Pattern> &get_pattern () { return ident_pattern; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-02 7:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 7:11 [gcc/devel/rust/master] Add accessors to HIR::StructPatternFieldIdentPat Thomas Schwinge
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).