aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.h
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-07-10 15:42:49 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-07-17 11:17:14 +0000
commit9cf8b77a3ef0ffcea40d13295938f7bda91985f9 (patch)
tree8ff0497560bfb1bf5a0c9b1deaaff7015b3ece72 /gcc/rust/backend/rust-compile-base.h
parentb7c8f5a33bace9186a151cb6281e15afae176b94 (diff)
downloadgcc-9cf8b77a3ef0ffcea40d13295938f7bda91985f9.zip
gcc-9cf8b77a3ef0ffcea40d13295938f7bda91985f9.tar.gz
gcc-9cf8b77a3ef0ffcea40d13295938f7bda91985f9.tar.bz2
Replace some usages of Location with location_t
gcc/rust/ChangeLog: * ast/rust-ast-collector.cc: Replace Location with location_t. * ast/rust-ast.cc: Likewise. * ast/rust-ast.h: Likewise. * ast/rust-expr.h: Likewise. * ast/rust-item.h: Likewise. * ast/rust-macro.h: Likewise. * ast/rust-path.cc: Likewise. * ast/rust-path.h: Likewise. * ast/rust-pattern.h: Likewise. * ast/rust-stmt.h: Likewise. * ast/rust-type.h: Likewise. * backend/rust-compile-base.cc: Likewise. * backend/rust-compile-base.h: Likewise. * backend/rust-compile-block.cc: Likewise. * backend/rust-compile-expr.cc: Likewise. * backend/rust-compile-expr.h: Likewise. * backend/rust-compile-fnparam.cc: Likewise. * backend/rust-compile-fnparam.h: Likewise. * backend/rust-compile-intrinsic.cc: Likewise. * backend/rust-compile-pattern.cc: Likewise. * backend/rust-compile-resolve-path.h: Likewise. * backend/rust-compile.cc: Likewise. * checks/errors/rust-const-checker.cc: Likewise. * checks/errors/rust-const-checker.h: Likewise. * checks/errors/rust-unsafe-checker.cc: Likewise. * checks/errors/rust-unsafe-checker.h: Likewise. * expand/rust-macro-builtins.cc: Likewise. * expand/rust-macro-expand.h: Likewise. * hir/rust-ast-lower-base.h: Likewise. * hir/rust-ast-lower-implitem.h: Likewise. * hir/rust-ast-lower-item.cc: 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.cc: Likewise. * hir/tree/rust-hir.h: Likewise. * lex/rust-token.h: Likewise. * metadata/rust-extern-crate.cc: Likewise. * metadata/rust-extern-crate.h: Likewise. * parse/rust-parse-impl.h: Likewise. * parse/rust-parse.h: Likewise. * resolve/rust-ast-resolve-expr.cc: Likewise. * resolve/rust-ast-resolve-implitem.h: Likewise. * resolve/rust-ast-resolve-pattern.h: Likewise. * resolve/rust-ast-resolve-stmt.h: Likewise. * resolve/rust-ast-resolve-toplevel.h: Likewise. * resolve/rust-ast-resolve-type.h: Likewise. * resolve/rust-name-resolver.cc: Likewise. * resolve/rust-name-resolver.h: Likewise. * rust-diagnostics.cc: Likewise. * rust-diagnostics.h: Likewise. * rust-gcc.cc: Likewise. * rust-session-manager.cc: Likewise. * rust-session-manager.h: Likewise. * typecheck/rust-casts.cc: Likewise. * typecheck/rust-casts.h: Likewise. * typecheck/rust-coercion.cc: Likewise. * typecheck/rust-coercion.h: Likewise. * typecheck/rust-hir-path-probe.cc: Likewise. * typecheck/rust-hir-path-probe.h: Likewise. * typecheck/rust-hir-trait-reference.cc: Likewise. * typecheck/rust-hir-trait-reference.h: Likewise. * typecheck/rust-hir-trait-resolve.cc: Likewise. * typecheck/rust-hir-type-check-base.cc: Likewise. * typecheck/rust-hir-type-check-base.h: Likewise. * typecheck/rust-hir-type-check-item.cc: Likewise. * typecheck/rust-hir-type-check-item.h: Likewise. * typecheck/rust-hir-type-check-path.cc: Likewise. * typecheck/rust-hir-type-check-pattern.cc: Likewise. * typecheck/rust-hir-type-check-pattern.h: Likewise. * typecheck/rust-hir-type-check-type.cc: Likewise. * typecheck/rust-hir-type-check-type.h: Likewise. * typecheck/rust-hir-type-check.cc: Likewise. * typecheck/rust-hir-type-check.h: Likewise. * typecheck/rust-substitution-mapper.cc: Likewise. * typecheck/rust-substitution-mapper.h: Likewise. * typecheck/rust-type-util.cc: Likewise. * typecheck/rust-typecheck-context.cc: Likewise. * typecheck/rust-tyty-bounds.cc: Likewise. * typecheck/rust-tyty-call.h: Likewise. * typecheck/rust-tyty-subst.cc: Likewise. * typecheck/rust-tyty-subst.h: Likewise. * typecheck/rust-tyty-util.cc: Likewise. * typecheck/rust-tyty-util.h: Likewise. * typecheck/rust-tyty.cc: Likewise. * typecheck/rust-tyty.h: Likewise. * typecheck/rust-unify.cc: Likewise. * typecheck/rust-unify.h: Likewise. * util/rust-hir-map.cc: Likewise. * util/rust-hir-map.h: Likewise. * util/rust-identifier.h: Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.h')
-rw-r--r--gcc/rust/backend/rust-compile-base.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h
index 957aba1..8242abb 100644
--- a/gcc/rust/backend/rust-compile-base.h
+++ b/gcc/rust/backend/rust-compile-base.h
@@ -45,14 +45,16 @@ protected:
Location rvalue_locus);
tree coerce_to_dyn_object (tree compiled_ref, const TyTy::BaseType *actual,
- const TyTy::DynamicObjectType *ty, Location locus);
+ const TyTy::DynamicObjectType *ty,
+ location_t locus);
tree compute_address_for_trait_item (
const Resolver::TraitItemReference *ref,
const TyTy::TypeBoundPredicate *predicate,
std::vector<std::pair<Resolver::TraitReference *, HIR::ImplBlock *>>
&receiver_bounds,
- const TyTy::BaseType *receiver, const TyTy::BaseType *root, Location locus);
+ const TyTy::BaseType *receiver, const TyTy::BaseType *root,
+ location_t locus);
bool verify_array_capacities (tree ltype, tree rtype, Location ltype_locus,
Location rtype_locus);
@@ -63,22 +65,22 @@ protected:
Location expr_locus, bool is_qualified_path);
tree resolve_adjustements (std::vector<Resolver::Adjustment> &adjustments,
- tree expression, Location locus);
+ tree expression, location_t locus);
tree resolve_deref_adjustment (Resolver::Adjustment &adjustment,
- tree expression, Location locus);
+ tree expression, location_t locus);
tree resolve_indirection_adjustment (Resolver::Adjustment &adjustment,
- tree expression, Location locus);
+ tree expression, location_t locus);
tree resolve_unsized_adjustment (Resolver::Adjustment &adjustment,
- tree expression, Location locus);
+ tree expression, location_t locus);
tree resolve_unsized_slice_adjustment (Resolver::Adjustment &adjustment,
- tree expression, Location locus);
+ tree expression, location_t locus);
tree resolve_unsized_dyn_adjustment (Resolver::Adjustment &adjustment,
- tree expression, Location locus);
+ tree expression, location_t locus);
tree resolve_method_address (TyTy::FnType *fntype, TyTy::BaseType *receiver,
Location expr_locus);
@@ -88,17 +90,17 @@ protected:
tree compile_constant_item (TyTy::BaseType *resolved_type,
const Resolver::CanonicalPath *canonical_path,
- HIR::Expr *const_value_expr, Location locus);
+ HIR::Expr *const_value_expr, location_t locus);
tree compile_function (const std::string &fn_name, HIR::SelfParam &self_param,
std::vector<HIR::FunctionParam> &function_params,
const HIR::FunctionQualifiers &qualifiers,
HIR::Visibility &visibility, AST::AttrVec &outer_attrs,
- Location locus, HIR::BlockExpr *function_body,
+ location_t locus, HIR::BlockExpr *function_body,
const Resolver::CanonicalPath *canonical_path,
TyTy::FnType *fntype);
- static tree unit_expression (Context *ctx, Location locus);
+ static tree unit_expression (Context *ctx, location_t locus);
static void setup_fndecl (tree fndecl, bool is_main_entry_point,
bool is_generic_fn, HIR::Visibility &visibility,
@@ -126,9 +128,9 @@ protected:
static void setup_abi_options (tree fndecl, ABI abi);
- static tree address_expression (tree expr, Location locus);
+ static tree address_expression (tree expr, location_t locus);
- static tree indirect_expression (tree expr, Location locus);
+ static tree indirect_expression (tree expr, location_t locus);
static bool mark_addressable (tree, Location);