diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-07-27 10:15:41 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-07-27 10:15:41 -0700 |
commit | 9f62ed218fa656607740b386c0caa03e65dcd283 (patch) | |
tree | 6bde49bc5e4c4241266b108e4277baef4b85535d /gcc/ada/lib-xref.adb | |
parent | 71e955da39cea0ebffcfee3432effa622d14ca99 (diff) | |
parent | 5eb9f117a361538834b9740d59219911680717d1 (diff) | |
download | gcc-9f62ed218fa656607740b386c0caa03e65dcd283.zip gcc-9f62ed218fa656607740b386c0caa03e65dcd283.tar.gz gcc-9f62ed218fa656607740b386c0caa03e65dcd283.tar.bz2 |
Merge from trunk revision 5eb9f117a361538834b9740d59219911680717d1.
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r-- | gcc/ada/lib-xref.adb | 76 |
1 files changed, 6 insertions, 70 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index 359e006..a4ff69a 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -57,14 +57,6 @@ package body Lib.Xref is -- Declarations -- ------------------ - package Deferred_References is new Table.Table ( - Table_Component_Type => Deferred_Reference_Entry, - Table_Index_Type => Int, - Table_Low_Bound => 0, - Table_Initial => 512, - Table_Increment => 200, - Table_Name => "Name_Deferred_References"); - -- The Xref table is used to record references. The Loc field is set -- to No_Location for a definition entry. @@ -211,21 +203,6 @@ package body Lib.Xref is end if; end Add_Entry; - --------------------- - -- Defer_Reference -- - --------------------- - - procedure Defer_Reference (Deferred_Reference : Deferred_Reference_Entry) is - begin - -- If Get_Ignore_Errors, then we are in Preanalyze_Without_Errors, and - -- we should not record cross references, because that will cause - -- duplicates when we call Analyze. - - if not Get_Ignore_Errors then - Deferred_References.Append (Deferred_Reference); - end if; - end Defer_Reference; - ----------- -- Equal -- ----------- @@ -664,7 +641,7 @@ package body Lib.Xref is -- a default in an instance. -- We also set the referenced flag in a generic package that is not in - -- then main source unit, when the variable is of a formal private type, + -- the main source unit, when the object is of a formal private type, -- to warn in the instance if the corresponding type is not a fully -- initialized type. @@ -694,6 +671,7 @@ package body Lib.Xref is return; elsif Inside_A_Generic + and then Is_Object (E) and then Is_Generic_Type (Etype (E)) then Set_Referenced (E); @@ -936,10 +914,10 @@ package body Lib.Xref is if Chars (BE) = Chars (E) then if Has_Pragma_Unused (E) then Error_Msg_NE -- CODEFIX - ("??pragma Unused given for&!", N, BE); + ("??aspect Unused specified for&!", N, BE); else Error_Msg_NE -- CODEFIX - ("??pragma Unreferenced given for&!", N, BE); + ("??aspect Unreferenced specified for&!", N, BE); end if; exit; end if; @@ -952,10 +930,10 @@ package body Lib.Xref is elsif Has_Pragma_Unused (E) then Error_Msg_NE -- CODEFIX - ("??pragma Unused given for&!", N, E); + ("??aspect Unused specified for&!", N, E); else Error_Msg_NE -- CODEFIX - ("??pragma Unreferenced given for&!", N, E); + ("??aspect Unreferenced specified for&!", N, E); end if; end if; @@ -1290,21 +1268,6 @@ package body Lib.Xref is return E; end Get_Key; - ---------------------------- - -- Has_Deferred_Reference -- - ---------------------------- - - function Has_Deferred_Reference (Ent : Entity_Id) return Boolean is - begin - for J in Deferred_References.First .. Deferred_References.Last loop - if Deferred_References.Table (J).E = Ent then - return True; - end if; - end loop; - - return False; - end Has_Deferred_Reference; - ---------- -- Hash -- ---------- @@ -2752,33 +2715,6 @@ package body Lib.Xref is end Output_Refs; end Output_References; - --------------------------------- - -- Process_Deferred_References -- - --------------------------------- - - procedure Process_Deferred_References is - begin - for J in Deferred_References.First .. Deferred_References.Last loop - declare - D : Deferred_Reference_Entry renames Deferred_References.Table (J); - - begin - case Known_To_Be_Assigned (D.N) is - when True => - Generate_Reference (D.E, D.N, 'm'); - - when False => - Generate_Reference (D.E, D.N, 'r'); - - end case; - end; - end loop; - - -- Clear processed entries from table - - Deferred_References.Init; - end Process_Deferred_References; - -- Start of elaboration for Lib.Xref begin |