From 94e53f8e55e93da8db3d948c3f16d23b7c4ba7a6 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Wed, 3 Aug 2022 11:54:54 +0100 Subject: Refactor indirect_expression from the gcc-backend wrapper This brings out the indirect expression out of our gcc wrapper, it also just simplifies down to the normal build_indirect_expr_loc calls. Which does not require specifiying the type since we can reuse TREE_TYPE. This also simplifies the address_expression to just address_expr_with_loc and grabs the type from TREE_TYPE as well. --- gcc/rust/backend/rust-compile-base.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/rust/backend/rust-compile-base.h') diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h index f993d06..aad0da3 100644 --- a/gcc/rust/backend/rust-compile-base.h +++ b/gcc/rust/backend/rust-compile-base.h @@ -101,7 +101,9 @@ protected: static void setup_abi_options (tree fndecl, ABI abi); - static tree address_expression (tree expr, tree ptrtype, Location locus); + static tree address_expression (tree expr, Location locus); + + static tree indirect_expression (tree expr, Location locus); static bool mark_addressable (tree, Location); -- cgit v1.1