]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add accessors to HIR::StructPatternFieldIdentPat
authorOwen Avery <powerboat9.gamer@gmail.com>
Wed, 26 Apr 2023 20:33:07 +0000 (16:33 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:14 +0000 (18:34 +0100)
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>
gcc/rust/hir/tree/rust-hir-pattern.h

index 5fa9a1747a8676830587d12e4ebfa6f9d7d25558..a76588f199562c51a26f75341b8ccea81bebf7fa 100644 (file)
@@ -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 */