diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-05-09 10:17:09 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-06-01 08:43:19 +0000 |
commit | 5cfde7a0b5ffd2cd0e792f07f849b9b1b0bea290 (patch) | |
tree | b01faa4a536d97167663111382617ddb16dc3935 /gcc/ada/sem_res.adb | |
parent | 4e8310b33c37d1eaaa4ffd08aca404a787252cf5 (diff) | |
download | gcc-5cfde7a0b5ffd2cd0e792f07f849b9b1b0bea290.zip gcc-5cfde7a0b5ffd2cd0e792f07f849b9b1b0bea290.tar.gz gcc-5cfde7a0b5ffd2cd0e792f07f849b9b1b0bea290.tar.bz2 |
[Ada] Rename Returns_On_Secondary_Stack into Needs_Secondary_Stack
The Returns_On_Secondary_Stack predicate is a misnomer because it must be
invoked on a type and types do not return; as a matter of fact, the other
Returns_XXX predicates apply to functions.
gcc/ada/
* exp_ch6.adb (Caller_Known_Size): Invoke Needs_Secondary_Stack in
lieu of Returns_On_Secondary_Stack.
(Expand_Call_Helper): Likewise.
(Expand_Simple_Function_Return): Likewise.
(Needs_BIP_Alloc_Form): Likewise.
* exp_ch7.adb (Wrap_Transient_Declaration): Likewise.
* sem_res.adb (Resolve_Call): Likewise.
(Resolve_Entry_Call): Likewise.
* sem_util.ads (Returns_On_Secondary_Stack): Rename into...
(Needs_Secondary_Stack): ...this.
* sem_util.adb (Returns_On_Secondary_Stack): Rename into...
(Needs_Secondary_Stack): ...this.
* fe.h (Returns_On_Secondary_Stack): Delete.
(Needs_Secondary_Stack): New function.
* gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Replace call
to Returns_On_Secondary_Stack with Needs_Secondary_Stack.
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index ad6d467..7d595eb 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6959,8 +6959,7 @@ package body Sem_Res is and then Requires_Transient_Scope (Etype (Nam)) and then not Is_Ignored_Ghost_Entity (Nam) then - Establish_Transient_Scope - (N, Returns_On_Secondary_Stack (Etype (Nam))); + Establish_Transient_Scope (N, Needs_Secondary_Stack (Etype (Nam))); -- If the call appears within the bounds of a loop, it will be -- rewritten and reanalyzed, nothing left to do here. @@ -8540,8 +8539,7 @@ package body Sem_Res is elsif Expander_Active and then Requires_Transient_Scope (Etype (Nam)) then - Establish_Transient_Scope - (N, Returns_On_Secondary_Stack (Etype (Nam))); + Establish_Transient_Scope (N, Needs_Secondary_Stack (Etype (Nam))); end if; -- Now we know that this is not a call to a function that returns an |