Skip to content

Commit

Permalink
Removed obsolete objects
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* backend/rust-compile-expr.cc (CompileExpr::visit): Lines
	removed as the objects are unused.

Signed-off-by: Kushal Pal <[email protected]>
  • Loading branch information
braw-lee authored and P-E-P committed May 6, 2024
1 parent ba8ce7e commit 3b9a040
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions gcc/rust/backend/rust-compile-expr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b9a040

Please sign in to comment.