aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ali.ads
diff options
context:
space:
mode:
authorEmmanuel Briot <briot@adacore.com>2007-10-15 15:54:12 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-10-15 15:54:12 +0200
commit250db54966b8b904a54eff9d940cb84f799c5331 (patch)
treef0252da96af134155da2f1882eb63debedfb2dd7 /gcc/ada/ali.ads
parentaace458a3ebb6f55045922bbccd23926e2d16e71 (diff)
downloadgcc-250db54966b8b904a54eff9d940cb84f799c5331.zip
gcc-250db54966b8b904a54eff9d940cb84f799c5331.tar.gz
gcc-250db54966b8b904a54eff9d940cb84f799c5331.tar.bz2
ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default value.
2007-10-15 Emmanuel Briot <briot@adacore.com> * ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default value. (Xref_Record): Change type for Line, since in the case of a reference to a predefined entity (as happens for array index types), the line is set to 0. Add support for parsing multiple array index types info, or multiple inherited interfaces info. This information cannot be stored in Xref_Entity_Record, which only supports a single instance of Tref_*, and is therefore stored in the list of references instead. It has a special treatement later on in tools that use this information. From-SVN: r129320
Diffstat (limited to 'gcc/ada/ali.ads')
-rw-r--r--gcc/ada/ali.ads19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ada/ali.ads b/gcc/ada/ali.ads
index e9ae46a..c90954a 100644
--- a/gcc/ada/ali.ads
+++ b/gcc/ada/ali.ads
@@ -865,6 +865,13 @@ package ALI is
Table_Increment => 300,
Table_Name => "Xref_Entity");
+ Array_Index_Reference : constant Character := '*';
+ Interface_Reference : constant Character := 'I';
+ -- Some special types of references. In the ALI file itself, these
+ -- are output as attributes of the entity, not as references, but
+ -- there is no provision in Xref_Entity_Record for storing multiple
+ -- such references.
+
-- The following table records actual cross-references
type Xref_Record is record
@@ -873,8 +880,9 @@ package ALI is
-- that if no file entry is present explicitly, this is just a copy
-- of the reference for the current cross-reference section.
- Line : Pos;
- -- Line number for the reference
+ Line : Nat;
+ -- Line number for the reference. This is zero when referencing a
+ -- predefined entity, but in this case Name is set.
Rtype : Character;
-- Indicates type of reference, using code used in ALI file:
@@ -884,11 +892,18 @@ package ALI is
-- c = completion of private or incomplete type
-- x = type extension
-- i = implicit reference
+ -- Array_Index_Reference = reference to the index of an array
+ -- Interface_Reference = reference to an interface implemented
+ -- by the type
-- See description in lib-xref.ads for further details
Col : Nat;
-- Column number for the reference
+ Name : Name_Id := No_Name;
+ -- This is only used when referencing a predefined entity. Currently,
+ -- this only occurs for array indexes.
+
-- Note: for instantiation references, Rtype is set to ' ', and Col is
-- set to zero. One or more such entries can follow any other reference.
-- When there is more than one such entry, this is to be read as: