diff options
author | Kushal Pal <kushalpal109@gmail.com> | 2024-04-24 06:04:53 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:21 +0100 |
commit | c827177a53162bbbc72c5b2e5ea2200b7d6b33fd (patch) | |
tree | 39dd387c325a8c410234a9e07a0e6be362a0f15b /gcc/rust/backend/rust-compile-expr.cc | |
parent | cd4432ed90a482dffdd6dd4524c7b243799bca23 (diff) | |
download | gcc-c827177a53162bbbc72c5b2e5ea2200b7d6b33fd.zip gcc-c827177a53162bbbc72c5b2e5ea2200b7d6b33fd.tar.gz gcc-c827177a53162bbbc72c5b2e5ea2200b7d6b33fd.tar.bz2 |
gccrs: Removed obsolete objects
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Lines
removed as the objects are unused.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index 8745858..9ffd863 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -1304,23 +1304,14 @@ CompileExpr::visit (HIR::MethodCallExpr &expr) { const TyTy::DynamicObjectType *dyn = static_cast<const TyTy::DynamicObjectType *> (receiver->get_root ()); - - std::vector<HIR::Expr *> arguments; - for (auto &arg : expr.get_arguments ()) - arguments.push_back (arg.get ()); - fn_expr = get_fn_addr_from_dyn (dyn, receiver, fntype, self, expr.get_locus ()); self = get_receiver_from_dyn (dyn, receiver, fntype, self, expr.get_locus ()); } else - { - // lookup compiled functions since it may have already been compiled - HIR::PathExprSegment method_name = expr.get_method_name (); - HIR::PathIdentSegment segment_name = method_name.get_segment (); - fn_expr = resolve_method_address (fntype, receiver, expr.get_locus ()); - } + // lookup compiled functions since it may have already been compiled + fn_expr = resolve_method_address (fntype, receiver, expr.get_locus ()); // lookup the autoderef mappings HirId autoderef_mappings_id |