diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2023-10-17 16:02:32 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:09:23 +0100 |
commit | a45f93039ad201cbdf5d9e0caf4068d39221a220 (patch) | |
tree | 495473624cc4ce61d760f299a5ef25e3ae323b88 /gcc/rust/hir/rust-hir-dump.cc | |
parent | 60a0729b2a0b306c8bb59d2de72f0ca9dfa404e5 (diff) | |
download | gcc-a45f93039ad201cbdf5d9e0caf4068d39221a220.zip gcc-a45f93039ad201cbdf5d9e0caf4068d39221a220.tar.gz gcc-a45f93039ad201cbdf5d9e0caf4068d39221a220.tar.bz2 |
gccrs: hir: Rename get_pattern_mappings method
Unify with the name used in Expr to allow convenient template over
everything that has mappings.
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc: Rename method.
* backend/rust-compile-expr.cc (sort_tuple_patterns): Rename method.
* backend/rust-compile-pattern.cc (CompilePatternCaseLabelExpr::visit): Rename method.
(CompilePatternBindings::visit): Rename method.
(CompilePatternLet::visit): Rename method.
* backend/rust-compile-stmt.cc (CompileStmt::visit): Rename method.
* backend/rust-compile-var-decl.h: Rename method.
* hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::translate): Rename method.
* hir/rust-hir-dump.cc (Dump::visit): Rename method.
* hir/tree/rust-hir-path.h: Rename method.
* hir/tree/rust-hir-pattern.h: Rename method.
* hir/tree/rust-hir.h: Rename method.
* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::Resolve): Rename method.
(TypeCheckPattern::visit): Rename method.
(ClosureParamInfer::visit): Rename method.
* typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Rename method.
* util/rust-hir-map.cc (Mappings::insert_hir_pattern): Rename method.
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
-rw-r--r-- | gcc/rust/hir/rust-hir-dump.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc index 15f4763..45729b9 100644 --- a/gcc/rust/hir/rust-hir-dump.cc +++ b/gcc/rust/hir/rust-hir-dump.cc @@ -2019,7 +2019,7 @@ Dump::visit (LiteralPattern &e) { begin ("LiteralPattern"); put_field ("lit", e.get_literal ().as_string ()); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); end ("LiteralPattern"); } @@ -2042,7 +2042,7 @@ void Dump::visit (WildcardPattern &e) { begin ("WildcardPattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); end ("WildcardPattern"); } @@ -2075,7 +2075,7 @@ void Dump::visit (RangePattern &e) { begin ("RangePattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); put_field ("lower", e.get_lower_bound ()->as_string ()); put_field ("upper", e.get_upper_bound ()->as_string ()); put_field ("has_ellipsis_syntax", @@ -2087,7 +2087,7 @@ void Dump::visit (ReferencePattern &e) { begin ("ReferencePattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); put_field ("mut", std::to_string (e.is_mut ())); put_field ("pattern", e.get_referenced_pattern ()->as_string ()); end ("ReferencePattern"); @@ -2161,7 +2161,7 @@ void Dump::visit (TupleStructPattern &e) { begin ("TupleStructPattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); put_field ("path", e.get_path ().as_string ()); @@ -2191,7 +2191,7 @@ void Dump::visit (TuplePattern &e) { begin ("TuplePattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); visit_field ("items", e.get_items ()); end ("TuplePattern"); } @@ -2200,7 +2200,7 @@ void Dump::visit (SlicePattern &e) { begin ("SlicePattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); visit_collection ("items", e.get_items ()); end ("SlicePattern"); } @@ -2209,7 +2209,7 @@ void Dump::visit (AltPattern &e) { begin ("AltPattern"); - do_mappings (e.get_pattern_mappings ()); + do_mappings (e.get_mappings ()); visit_collection ("alts", e.get_alts ()); end ("AltPattern"); } |