diff options
author | Philip Herron <herron.philip@googlemail.com> | 2022-12-05 02:20:55 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:53 +0100 |
commit | 9f455ed820ccea4f5f37eaf7e5ed3a87cced028e (patch) | |
tree | 53e2b4150bf139c8fef9c8ee69cd6559e8873020 /gcc/rust/backend | |
parent | 03df9a040c979f97c6b0e1524899a7d457c2cb05 (diff) | |
download | gcc-9f455ed820ccea4f5f37eaf7e5ed3a87cced028e.zip gcc-9f455ed820ccea4f5f37eaf7e5ed3a87cced028e.tar.gz gcc-9f455ed820ccea4f5f37eaf7e5ed3a87cced028e.tar.bz2 |
gccrs: Cleanup unused parameters to fix the bootstrap build
gcc/rust/ChangeLog:
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): Remove unused parameters.
* backend/rust-constexpr.cc (constant_value_1): Likewise.
(fold_non_dependent_init): Likewise.
* backend/rust-tree.cc (publicly_uniquely_derived_p): Likewise.
(instantiation_dependent_expression_p): Likewise.
(type_has_nontrivial_copy_init): Likewise.
(is_normal_capture_proxy): Likewise.
(resolve_nondeduced_context): Likewise.
(undeduced_auto_decl): Likewise.
(require_deduced_type): Likewise.
* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
* checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit): Likewise.
* checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::visit): Likewise.
* checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
* checks/lints/rust-lint-marklive.cc (MarkLive::go): Likewise.
* checks/lints/rust-lint-unused-var.cc (unused_var_walk_fn): Likewise.
* expand/rust-macro-builtins.cc (try_expand_single_string_literal): Likewise.
(try_expand_many_expr): Likewise.
(parse_single_string_literal): Likewise.
(MacroBuiltin::assert_handler): Likewise.
(MacroBuiltin::file_handler): Likewise.
(MacroBuiltin::column_handler): Likewise.
(MacroBuiltin::concat_handler): Likewise.
(MacroBuiltin::env_handler): Likewise.
(MacroBuiltin::line_handler): Likewise.
* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
(ASTLoweringBase::handle_doc_item_attribute): Likewise.
* hir/rust-hir-dump.cc (Dump::visit): Likewise.
* hir/tree/rust-hir-full-test.cc (ConstGenericParam::accept_vis): Likewise.
* lex/rust-lex.cc (Lexer::parse_utf8_escape): Likewise.
(Lexer::parse_string): Likewise.
(Lexer::parse_char_or_lifetime): Likewise.
* lex/rust-lex.h: Likewise.
* metadata/rust-export-metadata.cc: Likewise.
* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
* resolve/rust-ast-resolve-type.cc (ResolveType::visit): Likewise.
(ResolveTypeToCanonicalPath::visit): Likewise.
* resolve/rust-ast-verify-assignee.h: Likewise.
* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
* typecheck/rust-hir-type-check-expr.h: Likewise.
* typecheck/rust-hir-type-check-item.h: Likewise.
* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
* typecheck/rust-tyty-rules.h: Likewise.
* util/rust-attributes.cc (AttributeChecker::visit): Likewise.
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile-type.cc | 8 | ||||
-rw-r--r-- | gcc/rust/backend/rust-constexpr.cc | 6 | ||||
-rw-r--r-- | gcc/rust/backend/rust-tree.cc | 38 |
3 files changed, 13 insertions, 39 deletions
diff --git a/gcc/rust/backend/rust-compile-type.cc b/gcc/rust/backend/rust-compile-type.cc index c8e1d3b..a1db6ad 100644 --- a/gcc/rust/backend/rust-compile-type.cc +++ b/gcc/rust/backend/rust-compile-type.cc @@ -428,7 +428,7 @@ TyTyResolveCompile::visit (const TyTy::SliceType &type) } void -TyTyResolveCompile::visit (const TyTy::BoolType &type) +TyTyResolveCompile::visit (const TyTy::BoolType &) { translated = ctx->get_backend ()->named_type ("bool", @@ -532,7 +532,7 @@ TyTyResolveCompile::visit (const TyTy::FloatType &type) } void -TyTyResolveCompile::visit (const TyTy::USizeType &type) +TyTyResolveCompile::visit (const TyTy::USizeType &) { translated = ctx->get_backend ()->named_type ( "usize", @@ -542,7 +542,7 @@ TyTyResolveCompile::visit (const TyTy::USizeType &type) } void -TyTyResolveCompile::visit (const TyTy::ISizeType &type) +TyTyResolveCompile::visit (const TyTy::ISizeType &) { translated = ctx->get_backend ()->named_type ( "isize", @@ -552,7 +552,7 @@ TyTyResolveCompile::visit (const TyTy::ISizeType &type) } void -TyTyResolveCompile::visit (const TyTy::CharType &type) +TyTyResolveCompile::visit (const TyTy::CharType &) { translated = ctx->get_backend ()->named_type ("char", diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc index 23d940d..912d73b 100644 --- a/gcc/rust/backend/rust-constexpr.cc +++ b/gcc/rust/backend/rust-constexpr.cc @@ -3996,8 +3996,7 @@ constexpr_fn_retval (const constexpr_ctx *ctx, tree body) // return an aggregate constant. If UNSHARE_P, return an unshared // copy of the initializer. static tree -constant_value_1 (tree decl, bool strict_p, bool return_aggregate_cst_ok_p, - bool unshare_p) +constant_value_1 (tree decl, bool, bool, bool unshare_p) { while (TREE_CODE (decl) == CONST_DECL) { @@ -6478,8 +6477,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, /* Like maybe_constant_init but first fully instantiate the argument. */ tree -fold_non_dependent_init (tree t, - tsubst_flags_t complain /*=tf_warning_or_error*/, +fold_non_dependent_init (tree t, tsubst_flags_t /*=tf_warning_or_error*/, bool manifestly_const_eval /*=false*/, tree object /* = NULL_TREE */) { diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index d2d170c..8243d4c 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -2060,11 +2060,7 @@ rs_tree_equal (tree t1, tree t2) /* TRUE iff TYPE is publicly & uniquely derived from PARENT. */ -bool -publicly_uniquely_derived_p (tree parent, tree type) -{ - return false; -} +bool publicly_uniquely_derived_p (tree, tree) { return false; } // forked from gcc/cp/typeck.cc comp_except_types @@ -3344,11 +3340,7 @@ release_tree_vector (vec<tree, va_gc> *vec) /* As above, but also check value-dependence of the expression as a whole. */ -bool -instantiation_dependent_expression_p (tree expression) -{ - return false; -} +bool instantiation_dependent_expression_p (tree) { return false; } // forked from gcc/cp/cvt.cc cp_get_callee @@ -3398,11 +3390,7 @@ scalarish_type_p (const_tree t) constructors are deleted. This function implements the ABI notion of non-trivial copy, which has diverged from the one in the standard. */ -bool -type_has_nontrivial_copy_init (const_tree type) -{ - return false; -} +bool type_has_nontrivial_copy_init (const_tree) { return false; } // forked from gcc/cp/tree.cc build_local_temp @@ -3425,11 +3413,7 @@ build_local_temp (tree type) /* Returns true iff DECL is a capture proxy for a normal capture (i.e. without explicit initializer). */ -bool -is_normal_capture_proxy (tree decl) -{ - return false; -} +bool is_normal_capture_proxy (tree) { return false; } // forked from gcc/cp/c-common.cc reject_gcc_builtin @@ -3694,7 +3678,7 @@ char_type_p (tree type) lvalue for the function template specialization. */ tree -resolve_nondeduced_context (tree orig_expr, tsubst_flags_t complain) +resolve_nondeduced_context (tree orig_expr, tsubst_flags_t) { return orig_expr; } @@ -3973,21 +3957,13 @@ decl_constant_var_p (tree decl) /* Returns true iff DECL is a variable or function declared with an auto type that has not yet been deduced to a real type. */ -bool -undeduced_auto_decl (tree decl) -{ - return false; -} +bool undeduced_auto_decl (tree) { return false; } // forked from gcc/cp/decl.cc require_deduced_type /* Complain if DECL has an undeduced return type. */ -bool -require_deduced_type (tree decl, tsubst_flags_t complain) -{ - return true; -} +bool require_deduced_type (tree, tsubst_flags_t) { return true; } /* Return the location of a tree passed to %+ formats. */ |