remove unnecessary second call to static_unwrap_type in ada_evaluate_subexp
authorJoel Brobecker <brobecker@adacore.com>
Tue, 18 Mar 2014 17:52:08 +0000 (10:52 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Mon, 28 Apr 2014 19:38:19 +0000 (15:38 -0400)
commit528653254b46ccd95d7ffbef73acbcc1242eaee6
tree6b57f65c417c2ebf3e01f856b0b0bde00e0e7de0
parentf01c1a090e6629be280efb3c596d818f1f74ae2a
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.
gdb/ChangeLog
gdb/ada-lang.c
This page took 0.024508 seconds and 4 git commands to generate.