and then
(Ekind (Current_Scope) /= E_Loop
or else Nkind (Parent (Call_Node)) /= N_Function_Call
- or else not Is_Build_In_Place_Function_Call
- (Parent (Call_Node)))
+ or else not
+ Is_Build_In_Place_Function_Call (Parent (Call_Node)))
then
- Establish_Transient_Scope (Call_Node, Manage_Sec_Stack => True);
+ Establish_Transient_Scope
+ (Call_Node, Returns_On_Secondary_Stack (Etype (Subp)));
end if;
end if;
end Expand_Call_Helper;
-- reclamation is done by the caller.
if Ekind (Curr_S) = E_Function
- and then Requires_Transient_Scope (Etype (Curr_S))
+ and then Returns_On_Secondary_Stack (Etype (Curr_S))
then
null;
and then Requires_Transient_Scope (Etype (Nam))
and then not Is_Ignored_Ghost_Entity (Nam)
then
- Establish_Transient_Scope (N, Manage_Sec_Stack => True);
+ Establish_Transient_Scope
+ (N, Returns_On_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.
elsif Expander_Active
and then Requires_Transient_Scope (Etype (Nam))
then
- Establish_Transient_Scope (N, Manage_Sec_Stack => True);
+ Establish_Transient_Scope
+ (N, Returns_On_Secondary_Stack (Etype (Nam)));
end if;
-- Now we know that this is not a call to a function that returns an