summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:42:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:42:37 +0000
commita9cfa7d8960124dec97f03cfa83dc81bdc2d39c8 (patch)
tree899ff257fa91dd9472295e0c76d8f9c924e4a50a /gcc/ada/lib-xref.ads
parentb5be70cd680f29f5e1dad13afd0206db10772311 (diff)
downloadgcc-a9cfa7d8960124dec97f03cfa83dc81bdc2d39c8.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101046 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-xref.ads')
-rw-r--r--gcc/ada/lib-xref.ads25
1 files changed, 19 insertions, 6 deletions
diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads
index 59c703fb78e..1a0055e5c2b 100644
--- a/gcc/ada/lib-xref.ads
+++ b/gcc/ada/lib-xref.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1998-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -54,7 +54,7 @@ package Lib.Xref is
-- The lines following the header look like
- -- line type col level entity renameref typeref ref ref ref
+ -- line type col level entity renameref instref typeref ref ref ref
-- line is the line number of the referenced entity. The name of
-- the entity starts in column col. Columns are numbered from one,
@@ -93,6 +93,17 @@ package Lib.Xref is
-- reference is a complex expressions, then renameref is omitted.
-- Here line/col give line/column as defined above.
+ -- instref is only present for package and subprogram instances.
+ -- The information in instref is the location of the point of
+ -- declaration of the generic parent unit. This part has the form:
+
+ -- [file|line]
+
+ -- without column information, on the reasonable assumption that
+ -- there is only one unit per line (the same assumption is made
+ -- in references to entities that are declared within instances,
+ -- see below).
+
-- typeref is the reference for a related type. This part is
-- optional. It is present for the following cases:
@@ -130,7 +141,7 @@ package Lib.Xref is
-- line is the line number of the reference
- -- col is the column number of the reference, as defined above.
+ -- col is the column number of the reference, as defined above
-- type is one of
-- b = body entity
@@ -296,7 +307,7 @@ package Lib.Xref is
-- the END line of the body has an explict reference to
-- the name of the procedure at line 12, column 13.
- -- the body ends at line 12, column 15, just past this label.
+ -- the body ends at line 12, column 15, just past this label
-- 16I9*My_Type<2|4I9> 18r8
@@ -350,7 +361,9 @@ package Lib.Xref is
-- For private types, the character + appears in the table. In this
-- case the kind of the underlying type is used, if available, to
-- determine the character to use in the xref listing. The listing
- -- will still include a '+' for a generic private type, for example.
+ -- will still include a '+' for a generic private type, for example,
+ -- but will retain the '*' for an object or formal parameter of such
+ -- a type.
-- For subprograms, the characters 'U' and 'V' appear in the table,
-- indicating procedures and functions. If the operation is abstract,
@@ -597,6 +610,6 @@ package Lib.Xref is
-- Output references to the current ali file
procedure Initialize;
- -- Initialize internal tables.
+ -- Initialize internal tables
end Lib.Xref;