diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-07-10 15:56:31 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:55:56 +0100 |
commit | df1da36415bb15919551f1b813443057263fc187 (patch) | |
tree | 13b5e3a55d14afcc6a3b24b20a77c6e093c2e761 /gcc/rust/hir/tree/rust-hir-expr.h | |
parent | d991a3f15f64d3a16cce0866508bb76d87b9627c (diff) | |
download | gcc-df1da36415bb15919551f1b813443057263fc187.zip gcc-df1da36415bb15919551f1b813443057263fc187.tar.gz gcc-df1da36415bb15919551f1b813443057263fc187.tar.bz2 |
gccrs: Replace some more usages of Location with location_t
gcc/rust/ChangeLog:
* ast/rust-ast.h: Replace Location with location_t.
* ast/rust-expr.h: Likewise.
* ast/rust-item.h: Likewise.
* ast/rust-macro.h: Likewise.
* ast/rust-path.h: Likewise.
* ast/rust-pattern.h: Likewise.
* ast/rust-stmt.h: Likewise.
* ast/rust-type.h: Likewise.
* hir/rust-ast-lower-base.h: Likewise.
* hir/tree/rust-hir-expr.h: Likewise.
* hir/tree/rust-hir-item.h: Likewise.
* hir/tree/rust-hir-path.h: Likewise.
* hir/tree/rust-hir-pattern.h: Likewise.
* hir/tree/rust-hir-stmt.h: Likewise.
* hir/tree/rust-hir-type.h: Likewise.
* hir/tree/rust-hir.h: Likewise.
* lex/rust-token.h: Likewise.
* resolve/rust-ast-resolve-pattern.h: Likewise.
* typecheck/rust-hir-trait-reference.h: Likewise.
* typecheck/rust-tyty-bounds.h: Likewise.
* typecheck/rust-tyty-call.h: Likewise.
* typecheck/rust-tyty-subst.h: Likewise.
* typecheck/rust-tyty-util.h: Likewise.
* typecheck/rust-tyty.h: Likewise.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir-expr.h')
-rw-r--r-- | gcc/rust/hir/tree/rust-hir-expr.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h index f4f08d5..e180d6c 100644 --- a/gcc/rust/hir/tree/rust-hir-expr.h +++ b/gcc/rust/hir/tree/rust-hir-expr.h @@ -94,7 +94,7 @@ public: return std::unique_ptr<LiteralExpr> (clone_literal_expr_impl ()); } - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -170,7 +170,7 @@ protected: OperatorExpr &operator= (OperatorExpr &&other) = default; public: - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } std::unique_ptr<Expr> &get_expr () { return main_or_left_expr; } @@ -791,7 +791,7 @@ public: GroupedExpr (GroupedExpr &&other) = default; GroupedExpr &operator= (GroupedExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1013,7 +1013,7 @@ public: ArrayExpr (ArrayExpr &&other) = default; ArrayExpr &operator= (ArrayExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1082,7 +1082,7 @@ public: ArrayIndexExpr (ArrayIndexExpr &&other) = default; ArrayIndexExpr &operator= (ArrayIndexExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1162,7 +1162,7 @@ public: /* Note: syntactically, can disambiguate single-element tuple from parens with * comma, i.e. (0,) rather than (0) */ - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1236,7 +1236,7 @@ public: TupleIndexExpr (TupleIndexExpr &&other) = default; TupleIndexExpr &operator= (TupleIndexExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1305,7 +1305,7 @@ public: WithInnerAttrs (std::move (inner_attribs)), locus (locus) {} - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1400,7 +1400,7 @@ public: Analysis::NodeMapping &get_mappings () { return mappings; } - Location get_locus () { return locus; } + location_t get_locus () { return locus; } virtual StructExprFieldKind get_kind () const = 0; @@ -1752,7 +1752,7 @@ public: // Returns whether function call has parameters. bool has_params () const { return !params.empty (); } - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1839,7 +1839,7 @@ public: MethodCallExpr (MethodCallExpr &&other) = default; MethodCallExpr &operator= (MethodCallExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -1923,7 +1923,7 @@ public: FieldAccessExpr (FieldAccessExpr &&other) = default; FieldAccessExpr &operator= (FieldAccessExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -2022,7 +2022,7 @@ public: std::unique_ptr<Type> &get_type () { return type; } - Location get_locus () const { return locus; } + location_t get_locus () const { return locus; } }; // Base closure definition expression HIR node - abstract @@ -2077,7 +2077,7 @@ public: std::string as_string () const override; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } ExprType get_expression_type () const override final { @@ -2191,7 +2191,7 @@ public: return std::unique_ptr<BlockExpr> (clone_block_expr_impl ()); } - Location get_locus () const override final { return start_locus; } + location_t get_locus () const override final { return start_locus; } Location get_start_locus () const { return start_locus; } @@ -2253,7 +2253,7 @@ public: label (std::move (label)), locus (locus) {} - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -2337,7 +2337,7 @@ public: BreakExpr (BreakExpr &&other) = default; BreakExpr &operator= (BreakExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -2376,7 +2376,7 @@ protected: {} public: - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } ExprType get_expression_type () const override final { @@ -2741,7 +2741,7 @@ public: ReturnExpr (ReturnExpr &&other) = default; ReturnExpr &operator= (ReturnExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -2807,7 +2807,7 @@ public: UnsafeBlockExpr (UnsafeBlockExpr &&other) = default; UnsafeBlockExpr &operator= (UnsafeBlockExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -2856,7 +2856,7 @@ public: // Returns whether the LoopLabel is in an error state. bool is_error () const { return label.is_error (); } - Location get_locus () const { return locus; } + location_t get_locus () const { return locus; } Analysis::NodeMapping &get_mappings () { return mappings; } @@ -2914,7 +2914,7 @@ protected: public: bool has_loop_label () const { return !loop_label.is_error (); } - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } std::unique_ptr<HIR::BlockExpr> &get_loop_block () { return loop_block; }; @@ -3212,7 +3212,7 @@ public: * vector of else ifs - i.e. not like a switch statement. TODO - is this a * better approach? or does it not parse correctly and have downsides? */ - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -3370,7 +3370,7 @@ public: return std::unique_ptr<IfLetExpr> (clone_if_let_expr_impl ()); } - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -3557,7 +3557,7 @@ public: std::unique_ptr<Expr> &get_guard_expr () { return guard_expr; } - Location get_locus () const { return locus; } + location_t get_locus () const { return locus; } }; /* A "match case" - a correlated match arm and resulting expression. Not @@ -3655,7 +3655,7 @@ public: MatchExpr (MatchExpr &&other) = default; MatchExpr &operator= (MatchExpr &&other) = default; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -3719,7 +3719,7 @@ public: std::string as_string () const override; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -3778,7 +3778,7 @@ public: std::string as_string () const override; - Location get_locus () const override final { return locus; } + location_t get_locus () const override final { return locus; } bool get_has_move () const { return has_move; } std::unique_ptr<BlockExpr> &get_block_expr () { return block_expr; } @@ -3841,7 +3841,7 @@ public: return lvalue_mappings; } - Location get_locus () const { return locus; } + location_t get_locus () const { return locus; } private: const Analysis::NodeMapping node_mappings; |