From 528653254b46ccd95d7ffbef73acbcc1242eaee6 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 18 Mar 2014 10:52:08 -0700 Subject: remove unnecessary second call to static_unwrap_type in ada_evaluate_subexp In ada-lang.c::ada_evaluate_subexp, case OP_VAR_VALUE, when noside is EVAL_AVOID_SIDE_EFFECTS, the first thing we do is set type as follow: type = static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol)); Later on in the same block, we make the same call: return value_zero (to_static_fixed_type (static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol))), not_lval); This patch removes the second call, since it should result in the same type being returned, so no point in making that call again. gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp) : Remove unnecessary second call to static_unwrap_type. --- gdb/ada-lang.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index da304ab..0acc1b5 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10205,10 +10205,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, } *pos += 4; - return value_zero - (to_static_fixed_type - (static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol))), - not_lval); + return value_zero (to_static_fixed_type (type), not_lval); } else { -- cgit v1.1