summaryrefslogtreecommitdiff
path: root/gcc/ada/ali.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2005-06-16 10:42:37 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-06-16 10:42:37 +0200
commit217efe162dcacbed0b3eb31c68a1ea9070285137 (patch)
tree899ff257fa91dd9472295e0c76d8f9c924e4a50a /gcc/ada/ali.adb
parente9437007b8d68b91b2d1ac803f8938c54b6c4188 (diff)
downloadgcc-217efe162dcacbed0b3eb31c68a1ea9070285137.tar.gz
lib-xref.ads, [...] (Generate_Definition): Treat any entity declared within an inlined body as referenced...
2005-06-14 Ed Schonberg <schonberg@adacore.com> Emmanuel Briot <briot@adacore.com> * lib-xref.ads, lib-xref.adb (Generate_Definition): Treat any entity declared within an inlined body as referenced, to prevent spurious warnings. (Output_One_Ref): If an entity renames an array component, indicate in the ALI file that this aliases (renames) the array. Capture as well function renamings that rename predefined operations. Add information about generic parent for package and subprogram instances. (Get_Type_Reference): For a subtype that is the renaming of an actual in an instantiation, use the first_subtype to ensure that we don't generate cross-reference information for internal types. For objects and parameters of a generic private type, retain the '*' indicator to distinguish such an entity from its type. * ali.ads (Xref_Entity_Record): New fields Iref_File_Num and Iref_Line, to store information about instantiated entities. * ali.adb (Scan_ALI): Add support for parsing the reference to the generic parent * xref_lib.adb (Skip_To_Matching_Closing_Bracket): New subprogram (Parse_Identifier_Info, Parse_Token): Add support for the generic parent information. From-SVN: r101046
Diffstat (limited to 'gcc/ada/ali.adb')
-rw-r--r--gcc/ada/ali.adb26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb
index 4c8a08b05a8..22c5e526968 100644
--- a/gcc/ada/ali.adb
+++ b/gcc/ada/ali.adb
@@ -439,6 +439,7 @@ package body ALI is
or else Nextc = '(' or else Nextc = ')'
or else Nextc = '{' or else Nextc = '}'
or else Nextc = '<' or else Nextc = '>'
+ or else Nextc = '[' or else Nextc = ']'
or else Nextc = '=';
end if;
end loop;
@@ -1886,6 +1887,31 @@ package body ALI is
XE.Lib := (Getc = '*');
XE.Entity := Get_Name;
+ -- Handle the information about generic instantiations
+
+ if Nextc = '[' then
+ Skipc; -- Opening '['
+ N := Get_Nat;
+
+ if Nextc /= '|' then
+ XE.Iref_File_Num := Current_File_Num;
+ XE.Iref_Line := N;
+ else
+ XE.Iref_File_Num :=
+ Sdep_Id (N + Nat (First_Sdep_Entry) - 1);
+ Skipc;
+ XE.Iref_Line := Get_Nat;
+ end if;
+
+ if Getc /= ']' then
+ Fatal_Error;
+ end if;
+
+ else
+ XE.Iref_File_Num := No_Sdep_Id;
+ XE.Iref_Line := 0;
+ end if;
+
Current_File_Num := XS.File_Num;
-- Renaming reference is present