aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/atree.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-06-06 10:50:23 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-05 08:28:18 +0000
commit69a70b0acbf01387ec1d1e85d2c7ed0d588d799e (patch)
tree67b7ab4aa3162168b8308da4ad940158aaedbf31 /gcc/ada/atree.h
parent1d5018955a37fa665acc8dcba8121dd365dbe9be (diff)
downloadgcc-69a70b0acbf01387ec1d1e85d2c7ed0d588d799e.zip
gcc-69a70b0acbf01387ec1d1e85d2c7ed0d588d799e.tar.gz
gcc-69a70b0acbf01387ec1d1e85d2c7ed0d588d799e.tar.bz2
[Ada] Perform object rewriting as renaming only in the expander
The rewriting as renaming optimization for object declarations is done partly during analysis, guarded with Expander_Active, and partly during expansion, so it makes sense to do it entirely during expansion. This merges the two cases and removes obsolete or unnecessary conditions guarding the transformation in the process. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite as a renaming for any nonaliased local object with nominal unconstrained subtype originally initialized with the result of a function call that has been rewritten as the dereference of a reference to the result. * sem_ch3.adb (Analyze_Object_Declaration): Do not do it here
Diffstat (limited to 'gcc/ada/atree.h')
0 files changed, 0 insertions, 0 deletions