From: Owen Avery Date: Wed, 26 Apr 2023 20:33:07 +0000 (-0400) Subject: gccrs: Add accessors to HIR::StructPatternFieldIdentPat X-Git-Tag: basepoints/gcc-15~2608 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=829785bb69adf0993f516cc6cdbcd066f7ca130b;p=thirdparty%2Fgcc.git gccrs: 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 --- diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h index 5fa9a1747a86..a76588f19956 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 &get_pattern () { return ident_pattern; } + protected: /* Use covariance to implement clone function as returning this object rather * than base */