diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-base.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc index 28f3941..a640a48 100644 --- a/gcc/rust/backend/rust-compile-base.cc +++ b/gcc/rust/backend/rust-compile-base.cc @@ -411,7 +411,7 @@ HIRCompileBase::mark_addressable (tree exp, Location locus) } tree -HIRCompileBase::address_expression (tree expr, tree ptrtype, Location location) +HIRCompileBase::address_expression (tree expr, Location location) { if (expr == error_mark_node) return error_mark_node; @@ -419,8 +419,16 @@ HIRCompileBase::address_expression (tree expr, tree ptrtype, Location location) if (!mark_addressable (expr, location)) return error_mark_node; - return build_fold_addr_expr_with_type_loc (location.gcc_location (), expr, - ptrtype); + return build_fold_addr_expr_loc (location.gcc_location (), expr); +} + +tree +HIRCompileBase::indirect_expression (tree expr, Location locus) +{ + if (expr == error_mark_node) + return error_mark_node; + + return build_fold_indirect_ref_loc (locus.gcc_location (), expr); } std::vector<Bvariable *> |