From ee7bb2944b75ce482dbf3bdb2d396efc98f1cf89 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 13:41:35 -0700 Subject: Turn value_zero into static "constructor" This turns value_zero into a static "constructor" of value. Approved-By: Simon Marchi --- gdb/rust-lang.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/rust-lang.c') diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index edffad4..ff30bab 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -1070,7 +1070,7 @@ rust_range (struct type *expect_type, struct expression *exp, high == NULL ? NULL : "end", index_type); if (noside == EVAL_AVOID_SIDE_EFFECTS) - return value_zero (range_type, lval_memory); + return value::zero (range_type, lval_memory); addrval = value_allocate_space_in_inferior (range_type->length ()); addr = value_as_long (addrval); @@ -1204,7 +1204,7 @@ rust_subscript (struct type *expect_type, struct expression *exp, else new_type = base_type; - return value_zero (new_type, VALUE_LVAL (lhs)); + return value::zero (new_type, VALUE_LVAL (lhs)); } else { @@ -1470,7 +1470,7 @@ rust_structop::evaluate (struct type *expect_type, else result = value_struct_elt (&lhs, {}, field_name, NULL, "structure"); if (noside == EVAL_AVOID_SIDE_EFFECTS) - result = value_zero (result->type (), VALUE_LVAL (result)); + result = value::zero (result->type (), VALUE_LVAL (result)); return result; } @@ -1571,7 +1571,7 @@ rust_structop::evaluate_funcall (struct type *expect_type, args[i + 1] = ops[i]->evaluate (nullptr, exp, noside); if (noside == EVAL_AVOID_SIDE_EFFECTS) - return value_zero (fn_type->target_type (), not_lval); + return value::zero (fn_type->target_type (), not_lval); return call_function_by_hand (function, NULL, args); } -- cgit v1.1