From a65cfae5f8b268158c23a862e7a996d15bbcef0e Mon Sep 17 00:00:00 2001 From: Artemiy Volkov Date: Mon, 20 Mar 2017 13:47:41 -0700 Subject: Add ability to return rvalue reference values from value_ref Parameterize value_ref() by the kind of reference type the value of which is requested. Change all callers to use the new API. gdb/ChangeLog PR gdb/14441 * ada-lang.c (ada_evaluate_subexp): Adhere to the new value_ref() interface. * c-valprint.c (c_value_print): Likewise. * infcall.c (value_arg_coerce): Likewise. * python/py-value.c (valpy_reference_value): Likewise. * valops.c (value_cast, value_reinterpret_cast) (value_dynamic_cast, typecmp): Likewise. (value_ref): Parameterize by kind of return value reference type. * value.h (value_ref): Add new parameter "refcode". --- gdb/ada-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 753409c..9b91e0c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10707,7 +10707,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, should return a ref as it should be valid to ask for its address; so rebuild a ref after coerce. */ arg1 = ada_coerce_ref (arg1); - return value_ref (arg1); + return value_ref (arg1, TYPE_CODE_REF); } } -- cgit v1.1