diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-02-27 14:39:22 +0100 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-02-29 15:52:44 +0000 |
commit | 6895e0bb24ddc3893f917537b319ac20ba31f369 (patch) | |
tree | bf8050f889fc7db23041f3c5bc64d596b7d5e9d0 /gcc/rust/backend/rust-compile-expr.h | |
parent | e9de5b410da43cb2ac5f9865756153648e6f078b (diff) | |
download | gcc-6895e0bb24ddc3893f917537b319ac20ba31f369.zip gcc-6895e0bb24ddc3893f917537b319ac20ba31f369.tar.gz gcc-6895e0bb24ddc3893f917537b319ac20ba31f369.tar.bz2 |
lang-items: Make lang items enum stronger, rename class, cleanup ns.
gcc/rust/ChangeLog:
* util/rust-lang-item.h (class RustLangItem): Renamed to...
(class LangItem): ...this. Rename ItemType enum to Kind
* util/rust-lang-item.cc: Rename methods to use new class name.
* backend/rust-compile-expr.cc (CompileExpr::visit): Use new lang-item API.
(CompileExpr::resolve_operator_overload): Likewise.
* backend/rust-compile-expr.h: Likewise.
* hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_lang_item_attribute): Likewise.
* typecheck/rust-autoderef.cc (Adjuster::try_deref_type): Likewise.
(AutoderefCycle::cycle): Likewise.
* typecheck/rust-autoderef.h: Likewise.
* typecheck/rust-hir-type-bounds.h: Likewise.
* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::get_marker_predicate): Likewise.
* typecheck/rust-hir-type-check-base.h: Likewise.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
* typecheck/rust-hir-type-check-expr.h: Likewise.
* typecheck/rust-hir-type-check-type.cc (TypeResolveGenericParam::visit): Likewise.
* typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::assemble_sized_builtin): Likewise.
(TypeBoundsProbe::assemble_builtin_candidate): Likewise.
(TypeCheckBase::get_predicate_from_bound): Likewise.
* typecheck/rust-tyty.cc (ClosureType::setup_fn_once_output): Likewise.
* util/rust-hir-map.cc (Mappings::get_lang_item): Likewise.
(Mappings::lookup_trait_item_lang_item): Likewise.
* util/rust-hir-map.h: Likewise.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index e947825..af2e1bc 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -97,10 +97,10 @@ protected: TyTy::BaseType *receiver, TyTy::FnType *fntype, tree receiver_ref, location_t expr_locus); - tree - resolve_operator_overload (Analysis::RustLangItem::ItemType lang_item_type, - HIR::OperatorExprMeta expr, tree lhs, tree rhs, - HIR::Expr *lhs_expr, HIR::Expr *rhs_expr); + tree resolve_operator_overload (LangItem::Kind lang_item_type, + HIR::OperatorExprMeta expr, tree lhs, + tree rhs, HIR::Expr *lhs_expr, + HIR::Expr *rhs_expr); tree compile_bool_literal (const HIR::LiteralExpr &expr, const TyTy::BaseType *tyty); |