aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-07-10 15:56:31 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-07-18 09:08:16 +0000
commit0e7f04ad269afa1c08cfc76230aa10e99707e4dd (patch)
tree1ded10878d2dd431f4cd58a757d83fa8fd949650 /gcc/rust/hir
parent9cf8b77a3ef0ffcea40d13295938f7bda91985f9 (diff)
downloadgcc-0e7f04ad269afa1c08cfc76230aa10e99707e4dd.zip
gcc-0e7f04ad269afa1c08cfc76230aa10e99707e4dd.tar.gz
gcc-0e7f04ad269afa1c08cfc76230aa10e99707e4dd.tar.bz2
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')
-rw-r--r--gcc/rust/hir/rust-ast-lower-base.h2
-rw-r--r--gcc/rust/hir/tree/rust-hir-expr.h58
-rw-r--r--gcc/rust/hir/tree/rust-hir-item.h50
-rw-r--r--gcc/rust/hir/tree/rust-hir-path.h16
-rw-r--r--gcc/rust/hir/tree/rust-hir-pattern.h28
-rw-r--r--gcc/rust/hir/tree/rust-hir-stmt.h6
-rw-r--r--gcc/rust/hir/tree/rust-hir-type.h4
-rw-r--r--gcc/rust/hir/tree/rust-hir.h20
8 files changed, 92 insertions, 92 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-base.h b/gcc/rust/hir/rust-ast-lower-base.h
index 65a38ad..7b92e7b 100644
--- a/gcc/rust/hir/rust-ast-lower-base.h
+++ b/gcc/rust/hir/rust-ast-lower-base.h
@@ -44,7 +44,7 @@ public:
{}
const Analysis::NodeMapping &get_mappings () const { return mappings; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
const AST::AttrVec &get_outer_attrs () const { return outer_attrs; }
private:
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h
index fe8574f..a8965c0 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;
diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h
index efc4816..bc5ff30 100644
--- a/gcc/rust/hir/tree/rust-hir-item.h
+++ b/gcc/rust/hir/tree/rust-hir-item.h
@@ -113,7 +113,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;
@@ -270,7 +270,7 @@ public:
TypeBoundWhereClauseItem &operator= (TypeBoundWhereClauseItem &&other)
= default;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::string as_string () const override;
@@ -447,7 +447,7 @@ public:
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
ImplicitSelfKind get_self_kind () const { return self_kind; }
@@ -542,7 +542,7 @@ public:
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::unique_ptr<Pattern> &get_param_name () { return param_name; }
@@ -714,7 +714,7 @@ public:
* the module. */
void add_crate_name (std::vector<std::string> &names) const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::Module; }
@@ -766,7 +766,7 @@ public:
as_clause_name (std::move (as_clause_name)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::ExternCrate; }
std::string get_referenced_crate () { return referenced_crate; }
@@ -813,7 +813,7 @@ public:
virtual std::string as_string () const = 0;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
protected:
// Clone function implementation as pure virtual method
@@ -1048,7 +1048,7 @@ public:
UseDeclaration (UseDeclaration &&other) = default;
UseDeclaration &operator= (UseDeclaration &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::UseDeclaration; }
std::unique_ptr<UseTree> &get_use_tree () { return use_tree; }
@@ -1177,7 +1177,7 @@ public:
Function (Function &&other) = default;
Function &operator= (Function &&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 (HIRImplVisitor &vis) override;
@@ -1314,7 +1314,7 @@ public:
TypeAlias (TypeAlias &&other) = default;
TypeAlias &operator= (TypeAlias &&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 (HIRImplVisitor &vis) override;
@@ -1386,7 +1386,7 @@ public:
// Returns whether struct has a where clause.
bool has_where_clause () const { return !where_clause.is_empty (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::Struct; }
std::vector<std::unique_ptr<GenericParam>> &get_generic_params ()
@@ -1502,7 +1502,7 @@ public:
Analysis::NodeMapping get_mappings () const { return mappings; }
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
AST::AttrVec &get_outer_attrs () { return outer_attrs; }
Visibility &get_visibility () { return visibility; }
};
@@ -1632,7 +1632,7 @@ public:
Visibility &get_visibility () { return visibility; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
AST::AttrVec &get_outer_attrs () { return outer_attrs; }
std::unique_ptr<HIR::Type> &get_field_type () { return field_type; }
@@ -1720,7 +1720,7 @@ public:
void accept_vis (HIRStmtVisitor &vis) override;
// void accept_vis (HIRVisItemVisitor &vis) override;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
Identifier get_identifier () const { return variant_name; }
@@ -1940,7 +1940,7 @@ public:
Enum (Enum &&other) = default;
Enum &operator= (Enum &&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 (HIRStmtVisitor &vis) override;
@@ -2048,7 +2048,7 @@ public:
Identifier get_identifier () const { return union_name; }
- 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 (HIRStmtVisitor &vis) override;
@@ -2114,7 +2114,7 @@ public:
return identifier.as_string () == std::string ("_");
}
- 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 (HIRStmtVisitor &vis) override;
@@ -2205,7 +2205,7 @@ public:
StaticItem (StaticItem &&other) = default;
StaticItem &operator= (StaticItem &&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 (HIRStmtVisitor &vis) override;
@@ -2375,7 +2375,7 @@ public:
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTraitItemVisitor &vis) override;
@@ -2462,7 +2462,7 @@ public:
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTraitItemVisitor &vis) override;
@@ -2555,7 +2555,7 @@ public:
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTraitItemVisitor &vis) override;
@@ -2690,7 +2690,7 @@ public:
Trait (Trait &&other) = default;
Trait &operator= (Trait &&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 (HIRStmtVisitor &vis) override;
@@ -2817,7 +2817,7 @@ public:
// Returns the polarity of the impl.
Polarity get_polarity () const { return polarity; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::unique_ptr<Type> &get_type () { return impl_type; };
@@ -2874,7 +2874,7 @@ public:
virtual std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
virtual void accept_vis (HIRFullVisitor &vis) = 0;
virtual void accept_vis (HIRExternalItemVisitor &vis) = 0;
@@ -3185,7 +3185,7 @@ public:
ExternBlock (ExternBlock &&other) = default;
ExternBlock &operator= (ExternBlock &&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 (HIRStmtVisitor &vis) override;
diff --git a/gcc/rust/hir/tree/rust-hir-path.h b/gcc/rust/hir/tree/rust-hir-path.h
index f6b5d62..33335f7 100644
--- a/gcc/rust/hir/tree/rust-hir-path.h
+++ b/gcc/rust/hir/tree/rust-hir-path.h
@@ -110,7 +110,7 @@ public:
std::unique_ptr<Type> &get_type () { return type; }
const std::unique_ptr<Type> &get_type () const { return type; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
class ConstGenericArg
@@ -225,7 +225,7 @@ public:
std::vector<ConstGenericArg> &get_const_args () { return const_args; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
/* A segment of a path in expression, including an identifier aspect and maybe
@@ -267,7 +267,7 @@ public:
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
PathIdentSegment &get_segment () { return segment_name; }
const PathIdentSegment &get_segment () const { return segment_name; }
@@ -373,7 +373,7 @@ public:
return convert_to_simple_path (has_opening_scope_resolution);
}
- 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;
@@ -478,7 +478,7 @@ public:
* function). Overriden in derived classes with other segments. */
virtual bool is_ident_only () const { return true; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// not pure virtual as class not abstract
virtual void accept_vis (HIRFullVisitor &vis);
@@ -803,7 +803,7 @@ public:
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Analysis::NodeMapping get_mappings () const { return mappings; }
@@ -854,7 +854,7 @@ public:
path_type (std::move (qual_path_type)), 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;
@@ -862,7 +862,7 @@ public:
QualifiedPathType &get_path_type () { return path_type; }
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
Analysis::NodeMapping get_pattern_mappings () const override final
{
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h
index 85add31..b3dc56a 100644
--- a/gcc/rust/hir/tree/rust-hir-pattern.h
+++ b/gcc/rust/hir/tree/rust-hir-pattern.h
@@ -46,7 +46,7 @@ public:
locus (locus), mappings (mappings)
{}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -128,7 +128,7 @@ public:
IdentifierPattern (IdentifierPattern &&other) = default;
IdentifierPattern &operator= (IdentifierPattern &&other) = default;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
bool is_mut () const { return mut == Mutability::Mut; }
bool get_is_ref () const { return is_ref; }
@@ -171,7 +171,7 @@ public:
: locus (locus), mappings (mappings)
{}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -247,7 +247,7 @@ public:
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Literal get_literal () const { return literal; }
bool get_has_minus () const { return has_minus; }
@@ -281,7 +281,7 @@ public:
std::string as_string () const override { return path.as_string (); }
- Location get_locus () const { return path.get_locus (); }
+ location_t get_locus () const { return path.get_locus (); }
PathInExpression &get_path () { return path; }
const PathInExpression &get_path () const { return path; }
@@ -317,7 +317,7 @@ public:
std::string as_string () const override { return path.as_string (); }
- Location get_locus () const { return path.get_locus (); }
+ location_t get_locus () const { return path.get_locus (); }
void accept_vis (HIRFullVisitor &vis) override;
@@ -388,7 +388,7 @@ public:
RangePattern (RangePattern &&other) = default;
RangePattern &operator= (RangePattern &&other) = default;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -469,7 +469,7 @@ public:
return mappings;
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
PatternType get_pattern_type () const override final
{
@@ -515,7 +515,7 @@ public:
virtual void accept_vis (HIRFullVisitor &vis) = 0;
virtual ItemType get_item_type () const = 0;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Analysis::NodeMapping get_mappings () const { return mappings; };
AST::AttrVec get_outer_attrs () { return outer_attrs; }
@@ -750,7 +750,7 @@ public:
bool has_struct_pattern_elems () const { return !elems.is_empty (); }
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -982,7 +982,7 @@ public:
TupleStructPattern (TupleStructPattern &&other) = default;
TupleStructPattern &operator= (TupleStructPattern &&other) = default;
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -1214,7 +1214,7 @@ public:
return *this;
}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -1289,7 +1289,7 @@ public:
return items;
}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -1361,7 +1361,7 @@ public:
return alts;
}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
diff --git a/gcc/rust/hir/tree/rust-hir-stmt.h b/gcc/rust/hir/tree/rust-hir-stmt.h
index 82beb1e..4f557b6 100644
--- a/gcc/rust/hir/tree/rust-hir-stmt.h
+++ b/gcc/rust/hir/tree/rust-hir-stmt.h
@@ -37,7 +37,7 @@ public:
: Stmt (std::move (mappings)), 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 (HIRStmtVisitor &vis) override;
@@ -133,7 +133,7 @@ public:
LetStmt (LetStmt &&other) = default;
LetStmt &operator= (LetStmt &&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 (HIRStmtVisitor &vis) override;
@@ -179,7 +179,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 (HIRStmtVisitor &vis) override;
diff --git a/gcc/rust/hir/tree/rust-hir-type.h b/gcc/rust/hir/tree/rust-hir-type.h
index 71574a1..67bbe9e 100644
--- a/gcc/rust/hir/tree/rust-hir-type.h
+++ b/gcc/rust/hir/tree/rust-hir-type.h
@@ -56,7 +56,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;
@@ -741,7 +741,7 @@ public:
return MaybeNamedParam ({""}, UNNAMED, nullptr, UNDEF_LOCATION);
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::unique_ptr<Type> &get_type () { return param_type; }
diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h
index 091f084..6ed5458 100644
--- a/gcc/rust/hir/tree/rust-hir.h
+++ b/gcc/rust/hir/tree/rust-hir.h
@@ -180,7 +180,7 @@ public:
virtual void accept_vis (HIRStmtVisitor &vis) = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual bool is_unit_check_needed () const { return false; }
@@ -320,7 +320,7 @@ public:
virtual ~Expr () {}
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
const Analysis::NodeMapping &get_mappings () const { return mappings; }
@@ -422,7 +422,7 @@ public:
virtual Analysis::NodeMapping get_pattern_mappings () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual PatternType get_pattern_type () const = 0;
@@ -464,7 +464,7 @@ public:
virtual void accept_vis (HIRTypeVisitor &vis) = 0;
virtual Analysis::NodeMapping get_mappings () const { return mappings; }
- virtual Location get_locus () const { return locus; }
+ virtual location_t get_locus () const { return locus; }
protected:
Type (Analysis::NodeMapping mappings, location_t locus)
@@ -529,7 +529,7 @@ public:
virtual Analysis::NodeMapping get_mappings () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual BoundType get_bound_type () const = 0;
@@ -579,7 +579,7 @@ public:
return lifetime_type;
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Analysis::NodeMapping get_mappings () const override final
{
@@ -621,7 +621,7 @@ public:
virtual std::string as_string () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
Analysis::NodeMapping get_mappings () const { return mappings; }
@@ -709,7 +709,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -746,7 +746,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override final;
- Location get_locus () const override final { return locus; };
+ location_t get_locus () const override final { return locus; };
bool has_default_expression () { return default_expression != nullptr; }
@@ -850,7 +850,7 @@ public:
virtual Analysis::NodeMapping get_impl_mappings () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual ImplItemType get_impl_item_type () const = 0;