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) <OP_VAR_VALUE>: Remove unnecessary second call to static_unwrap_type.
This commit is contained in:
parent
f01c1a090e
commit
528653254b
2 changed files with 6 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-04-28 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ada-lang.c (ada_evaluate_subexp) <OP_VAR_VALUE>: Remove
|
||||||
|
unnecessary second call to static_unwrap_type.
|
||||||
|
|
||||||
2014-04-27 Hui Zhu <hui@codesourcery.com>
|
2014-04-27 Hui Zhu <hui@codesourcery.com>
|
||||||
|
|
||||||
* stack.c (print_frame_info): Call do_gdb_disassembly with
|
* stack.c (print_frame_info): Call do_gdb_disassembly with
|
||||||
|
|
|
@ -10205,10 +10205,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
||||||
}
|
}
|
||||||
|
|
||||||
*pos += 4;
|
*pos += 4;
|
||||||
return value_zero
|
return value_zero (to_static_fixed_type (type), not_lval);
|
||||||
(to_static_fixed_type
|
|
||||||
(static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol))),
|
|
||||||
not_lval);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue