diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-07-10 16:13:59 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:55:59 +0100 |
commit | e99e565e0aa866cdec407f851d651096fb190f7f (patch) | |
tree | af88fb6f68ad04e5626ac1f596222db5ffa13f21 /gcc/rust/hir | |
parent | 80c68893f446bf883c67dd78c317b5c0f0f55f4f (diff) | |
download | gcc-e99e565e0aa866cdec407f851d651096fb190f7f.zip gcc-e99e565e0aa866cdec407f851d651096fb190f7f.tar.gz gcc-e99e565e0aa866cdec407f851d651096fb190f7f.tar.bz2 |
gccrs: Replace usages of Location with location_t in the lexer, AST, and HIR
gcc/rust/ChangeLog:
* ast/rust-ast-builder.h: Replace Location with location_t.
* ast/rust-ast.h: Likewise.
* ast/rust-expr.h: Likewise.
* ast/rust-item.h: Likewise.
* ast/rust-macro.h: Likewise.
* ast/rust-path.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.h: Likewise.
* lex/rust-lex.cc: Likewise.
* lex/rust-lex.h: Likewise.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r-- | gcc/rust/hir/tree/rust-hir-expr.h | 12 | ||||
-rw-r--r-- | gcc/rust/hir/tree/rust-hir-item.h | 6 | ||||
-rw-r--r-- | gcc/rust/hir/tree/rust-hir-path.h | 2 | ||||
-rw-r--r-- | gcc/rust/hir/tree/rust-hir.h | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h index e180d6c..f0e9a36 100644 --- a/gcc/rust/hir/tree/rust-hir-expr.h +++ b/gcc/rust/hir/tree/rust-hir-expr.h @@ -2121,8 +2121,8 @@ public: std::vector<std::unique_ptr<Stmt> > statements; std::unique_ptr<Expr> expr; bool tail_reachable; - Location start_locus; - Location end_locus; + location_t start_locus; + location_t end_locus; std::string as_string () const override; @@ -2140,7 +2140,7 @@ public: std::vector<std::unique_ptr<Stmt> > block_statements, std::unique_ptr<Expr> block_expr, bool tail_reachable, AST::AttrVec inner_attribs, AST::AttrVec outer_attribs, - Location start_locus, Location end_locus) + location_t start_locus, location_t end_locus) : ExprWithBlock (std::move (mappings), std::move (outer_attribs)), WithInnerAttrs (std::move (inner_attribs)), statements (std::move (block_statements)), expr (std::move (block_expr)), @@ -2193,9 +2193,9 @@ public: location_t get_locus () const override final { return start_locus; } - Location get_start_locus () const { return start_locus; } + location_t get_start_locus () const { return start_locus; } - Location get_end_locus () const { return end_locus; } + location_t get_end_locus () const { return end_locus; } void accept_vis (HIRFullVisitor &vis) override; void accept_vis (HIRExpressionVisitor &vis) override; @@ -3935,7 +3935,7 @@ public: std::vector<AST::TupleTemplateStr> template_strs; std::vector<AST::InlineAsmOperand> operands; AST::InlineAsmOptions options; - std::vector<Location> line_spans; + std::vector<location_t> line_spans; }; } // namespace HIR } // namespace Rust diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h index cb0dc13..75e02e9 100644 --- a/gcc/rust/hir/tree/rust-hir-item.h +++ b/gcc/rust/hir/tree/rust-hir-item.h @@ -2406,7 +2406,7 @@ public: return outer_attrs; } - Location get_trait_locus () const override { return get_locus (); } + location_t get_trait_locus () const override { return get_locus (); } protected: // Clone function implementation as (not pure) virtual method @@ -2493,7 +2493,7 @@ public: return outer_attrs; } - Location get_trait_locus () const override { return get_locus (); } + location_t get_trait_locus () const override { return get_locus (); } protected: // Clone function implementation as (not pure) virtual method @@ -2585,7 +2585,7 @@ public: return outer_attrs; } - Location get_trait_locus () const override { return get_locus (); } + location_t get_trait_locus () const override { return get_locus (); } protected: // Clone function implementation as (not pure) virtual method diff --git a/gcc/rust/hir/tree/rust-hir-path.h b/gcc/rust/hir/tree/rust-hir-path.h index 80456e8..b7644b8 100644 --- a/gcc/rust/hir/tree/rust-hir-path.h +++ b/gcc/rust/hir/tree/rust-hir-path.h @@ -1001,7 +1001,7 @@ public: bool is_error () const { return segments.empty (); } const Analysis::NodeMapping &get_mappings () const { return mappings; } - const Location &get_locus () const { return locus; } + location_t get_locus () const { return locus; } }; } // namespace HIR diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h index aac4b2d..76b6c73 100644 --- a/gcc/rust/hir/tree/rust-hir.h +++ b/gcc/rust/hir/tree/rust-hir.h @@ -814,7 +814,7 @@ public: const Analysis::NodeMapping &get_mappings () const { return mappings; } - virtual Location get_trait_locus () const = 0; + virtual location_t get_trait_locus () const = 0; virtual TraitItemKind get_item_kind () const = 0; |