public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Added missing GroupedPattern visitors for code generation Date: Mon, 30 Jan 2023 13:24:08 +0000 (GMT) [thread overview] Message-ID: <20230130132408.560A5385828E@sourceware.org> (raw) https://gcc.gnu.org/g:2ba4506b672aa0bfadb589e66ee6983e52348d44 commit 2ba4506b672aa0bfadb589e66ee6983e52348d44 Author: Owen Avery <powerboat9.gamer@gmail.com> Date: Wed Jan 11 11:57:28 2023 -0500 Added missing GroupedPattern visitors for code generation Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com> Diff: --- gcc/rust/backend/rust-compile-pattern.cc | 12 ++++++++++++ gcc/rust/backend/rust-compile-pattern.h | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/rust/backend/rust-compile-pattern.cc b/gcc/rust/backend/rust-compile-pattern.cc index 1d8eda1a577..b837f73d0b4 100644 --- a/gcc/rust/backend/rust-compile-pattern.cc +++ b/gcc/rust/backend/rust-compile-pattern.cc @@ -161,6 +161,12 @@ CompilePatternCaseLabelExpr::visit (HIR::RangePattern &pattern) case_label_expr = build_case_label (lower, upper, associated_case_label); } +void +CompilePatternCaseLabelExpr::visit (HIR::GroupedPattern &pattern) +{ + pattern.get_item ()->accept_vis (*this); +} + // setup the bindings void @@ -329,5 +335,11 @@ CompilePatternBindings::visit (HIR::StructPattern &pattern) } } +void +CompilePatternBindings::visit (HIR::GroupedPattern &pattern) +{ + pattern.get_item ()->accept_vis (*this); +} + } // namespace Compile } // namespace Rust diff --git a/gcc/rust/backend/rust-compile-pattern.h b/gcc/rust/backend/rust-compile-pattern.h index 0eb5d61249b..19d1e4b1c79 100644 --- a/gcc/rust/backend/rust-compile-pattern.h +++ b/gcc/rust/backend/rust-compile-pattern.h @@ -38,9 +38,9 @@ public: void visit (HIR::TupleStructPattern &pattern) override; void visit (HIR::WildcardPattern &pattern) override; void visit (HIR::RangePattern &pattern) override; + void visit (HIR::GroupedPattern &pattern) override; // Empty visit for unused Pattern HIR nodes. - void visit (HIR::GroupedPattern &) override {} void visit (HIR::IdentifierPattern &) override {} void visit (HIR::LiteralPattern &) override; void visit (HIR::QualifiedPathInExpression &) override {} @@ -70,9 +70,9 @@ public: void visit (HIR::StructPattern &pattern) override; void visit (HIR::TupleStructPattern &pattern) override; + void visit (HIR::GroupedPattern &) override; // Empty visit for unused Pattern HIR nodes. - void visit (HIR::GroupedPattern &) override {} void visit (HIR::IdentifierPattern &) override {} void visit (HIR::LiteralPattern &) override {} void visit (HIR::PathInExpression &) override {}
reply other threads:[~2023-01-30 13:24 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230130132408.560A5385828E@sourceware.org \ --to=tschwinge@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).