summaryrefslogtreecommitdiff
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-29 10:49:15 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-29 10:49:15 +0000
commita3e6563b2930eda54247c93617c90def3659c129 (patch)
tree0b6546d43b2e46559dc89368694673e09f48f367 /gcc/ada/freeze.adb
parent86cf57b9cdb2979f0f96645567a9dca8ccb34bf7 (diff)
downloadgcc-a3e6563b2930eda54247c93617c90def3659c129.tar.gz
2009-04-29 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb (Stream_Operation_OK): Return True for limited interfaces (other conditions permitting), so that abstract stream subprograms will be declared for them. 2009-04-29 Bob Duff <duff@adacore.com> * g-expect.adb (Expect_Internal): Fix check for overfull buffer. * g-expect.ads: Minor comment fixes. 2009-04-29 Ed Schonberg <schonberg@adacore.com> * freeze.adb, lib-xref.adb (Check_Dispatching_Operation): if the dispatching operation is a body without previous spec, update the list of primitive operations to ensure that cross-reference information is up-to-date. 2009-04-29 Albert Lee <lee@adacore.com> * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb, g-socthi.ads, g-socket.adb, g-socket.ads (GNAT.Sockets.Thin.C_Readv, GNAT.Sockets.Thin.C_Writev): Remove unused subprograms. (GNAT.Sockets.Thin.C_Recvmsg, GNAT.Sockets.Thin.C_Sendmsg): New bindings to call recvmsg(2) and sendmsg(2). (GNAT.Sockets.Receive_Vector, GNAT.Sockets.Send_Vector): Use C_Recvmsg/C_Sendmsg rather than Readv/C_Writev. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146949 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb96
1 files changed, 1 insertions, 95 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 7866432844e..fdacb091afc 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -36,7 +36,6 @@ with Exp_Pakd; use Exp_Pakd;
with Exp_Util; use Exp_Util;
with Exp_Tss; use Exp_Tss;
with Layout; use Layout;
-with Lib.Xref; use Lib.Xref;
with Namet; use Namet;
with Nlists; use Nlists;
with Nmake; use Nmake;
@@ -135,10 +134,6 @@ package body Freeze is
-- the designated type. Otherwise freezing the access type does not freeze
-- the designated type.
- procedure Generate_Prim_Op_References (Typ : Entity_Id);
- -- For a tagged type, generate implicit references to its primitive
- -- operations, for source navigation.
-
procedure Process_Default_Expressions
(E : Entity_Id;
After : in out Node_Id);
@@ -2583,29 +2578,10 @@ package body Freeze is
-- Here for other than a subprogram or type
else
- -- For a generic package, freeze types within, so that proper
- -- cross-reference information is generated for tagged types.
- -- This is the only freeze processing needed for generic packages.
-
- if Ekind (E) = E_Generic_Package then
- declare
- T : Entity_Id;
-
- begin
- T := First_Entity (E);
- while Present (T) loop
- if Is_Type (T) then
- Generate_Prim_Op_References (T);
- end if;
-
- Next_Entity (T);
- end loop;
- end;
-
-- If entity has a type, and it is not a generic unit, then
-- freeze it first (RM 13.14(10)).
- elsif Present (Etype (E))
+ if Present (Etype (E))
and then Ekind (E) /= E_Generic_Function
then
Freeze_And_Append (Etype (E), Loc, Result);
@@ -3598,10 +3574,6 @@ package body Freeze is
end if;
end if;
- -- Generate references to primitive operations for a tagged type
-
- Generate_Prim_Op_References (E);
-
-- Now that all types from which E may depend are frozen, see if the
-- size is known at compile time, if it must be unsigned, or if
-- strict alignment is required
@@ -5145,72 +5117,6 @@ package body Freeze is
end Is_Fully_Defined;
---------------------------------
- -- Generate_Prim_Op_References --
- ---------------------------------
-
- procedure Generate_Prim_Op_References (Typ : Entity_Id) is
- Base_T : Entity_Id;
- Prim : Elmt_Id;
- Prim_List : Elist_Id;
- Ent : Entity_Id;
-
- begin
- -- Handle subtypes of synchronized types
-
- if Ekind (Typ) = E_Protected_Subtype
- or else Ekind (Typ) = E_Task_Subtype
- then
- Base_T := Etype (Typ);
- else
- Base_T := Typ;
- end if;
-
- -- References to primitive operations are only relevant for tagged types
-
- if not Is_Tagged_Type (Base_T)
- or else Is_Class_Wide_Type (Base_T)
- then
- return;
- end if;
-
- -- Ada 2005 (AI-345): For synchronized types generate reference
- -- to the wrapper that allow us to dispatch calls through their
- -- implemented abstract interface types.
-
- -- The check for Present here is to protect against previously
- -- reported critical errors.
-
- if Is_Concurrent_Type (Base_T)
- and then Present (Corresponding_Record_Type (Base_T))
- then
- Prim_List := Primitive_Operations
- (Corresponding_Record_Type (Base_T));
- else
- Prim_List := Primitive_Operations (Base_T);
- end if;
-
- if No (Prim_List) then
- return;
- end if;
-
- Prim := First_Elmt (Prim_List);
- while Present (Prim) loop
-
- -- If the operation is derived, get the original for cross-reference
- -- reference purposes (it is the original for which we want the xref
- -- and for which the comes_from_source test must be performed).
-
- Ent := Node (Prim);
- while Present (Alias (Ent)) loop
- Ent := Alias (Ent);
- end loop;
-
- Generate_Reference (Typ, Ent, 'p', Set_Ref => False);
- Next_Elmt (Prim);
- end loop;
- end Generate_Prim_Op_References;
-
- ---------------------------------
-- Process_Default_Expressions --
---------------------------------