summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-04-26 16:33:07 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-04-27 22:17:51 +0000
commit8b6d44ad421a3fa886528173abffa91756c5789c (patch)
tree8939824b1895bec5fa9d800482ab5cdacc28b9f1
parentd2df050bd4392119adf64d0e35670c1a85d6451b (diff)
downloadgcc-8b6d44ad421a3fa886528173abffa91756c5789c.tar.gz
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>
-rw-r--r--gcc/rust/hir/tree/rust-hir-pattern.h4
1 files changed, 4 insertions, 0 deletions
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 */