diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-22 12:59:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-22 12:59:45 +0000 |
commit | 458511034db8a19655428edf67a2fa4344458df3 (patch) | |
tree | c33d7da6bd7121ca500be077fd85be7cd538b1bb /gcc/ada/exp_ch7.adb | |
parent | 67f36f785bf4cf1d9a79bd5e19f88e5016890e6a (diff) | |
download | gcc-458511034db8a19655428edf67a2fa4344458df3.tar.gz |
2008-08-22 Bob Duff <duff@adacore.com>
* exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb, freeze.adb,
exp_ch4.adb, exp_ch6.ads, exp_ch6.adb, sem_ch6.adb, exp_aggr.adb,
exp_intr.adb, exp_ch3.adb: Rename:
Exp_Ch7.Controlled_Type => Needs_Finalization
Exp_Ch7.CW_Or_Controlled_Type => CW_Or_Has_Controlled_Part
Exp_Ch5.Expand_N_Extended_Return_Statement.Controlled_Type =>
Has_Controlled_Parts
(Has_Some_Controlled_Component): Fix bug in array case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index fb0f7dcb021..f05ad7157f8 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -846,11 +846,11 @@ package body Exp_Ch7 is end if; end Check_Visibly_Controlled; - --------------------- - -- Controlled_Type -- - --------------------- + ------------------------ + -- Needs_Finalization -- + ------------------------ - function Controlled_Type (T : Entity_Id) return Boolean is + function Needs_Finalization (T : Entity_Id) return Boolean is function Has_Some_Controlled_Component (Rec : Entity_Id) return Boolean; -- If type is not frozen yet, check explicitly among its components, @@ -875,7 +875,7 @@ package body Exp_Ch7 is while Present (Comp) loop if not Is_Type (Comp) - and then Controlled_Type (Etype (Comp)) + and then Needs_Finalization (Etype (Comp)) then return True; end if; @@ -886,7 +886,7 @@ package body Exp_Ch7 is return False; elsif Is_Array_Type (Rec) then - return Is_Controlled (Component_Type (Rec)); + return Needs_Finalization (Component_Type (Rec)); else return Has_Controlled_Component (Rec); @@ -896,7 +896,7 @@ package body Exp_Ch7 is end if; end Has_Some_Controlled_Component; - -- Start of processing for Controlled_Type + -- Start of processing for Needs_Finalization begin -- Class-wide types must be treated as controlled because they may @@ -910,18 +910,18 @@ package body Exp_Ch7 is or else Is_Controlled (T) or else Has_Some_Controlled_Component (T) or else (Is_Concurrent_Type (T) - and then Present (Corresponding_Record_Type (T)) - and then Controlled_Type (Corresponding_Record_Type (T))); - end Controlled_Type; + and then Present (Corresponding_Record_Type (T)) + and then Needs_Finalization (Corresponding_Record_Type (T))); + end Needs_Finalization; - --------------------------- - -- CW_Or_Controlled_Type -- - --------------------------- + ------------------------------- + -- CW_Or_Has_Controlled_Part -- + ------------------------------- - function CW_Or_Controlled_Type (T : Entity_Id) return Boolean is + function CW_Or_Has_Controlled_Part (T : Entity_Id) return Boolean is begin - return Is_Class_Wide_Type (T) or else Controlled_Type (T); - end CW_Or_Controlled_Type; + return Is_Class_Wide_Type (T) or else Needs_Finalization (T); + end CW_Or_Has_Controlled_Part; -------------------------- -- Controller_Component -- @@ -2038,7 +2038,7 @@ package body Exp_Ch7 is null; elsif Scope (Original_Record_Component (Comp)) = E - and then Controlled_Type (Etype (Comp)) + and then Needs_Finalization (Etype (Comp)) then return True; end if; @@ -3429,7 +3429,7 @@ package body Exp_Ch7 is -- and the actual should be finalized on return from the call ??? if Nkind (N) = N_Object_Renaming_Declaration - and then Controlled_Type (Etype (Defining_Identifier (N))) + and then Needs_Finalization (Etype (Defining_Identifier (N))) then null; @@ -3439,7 +3439,7 @@ package body Exp_Ch7 is N_Selected_Component, N_Indexed_Component) and then - Controlled_Type + Needs_Finalization (Etype (Prefix (Renamed_Object (Defining_Identifier (N))))) then null; |