summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.ads
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-17 21:00:59 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-17 21:00:59 +0000
commit8880be8571f9ef03b3cd47702aa15d31f4c0dad3 (patch)
tree425ca9a59ec19c276fa2119f9e7b007ba368384d /gcc/ada/lib-xref.ads
parent303e829182e62008667899110e4f22831d1c419d (diff)
downloadgcc-8880be8571f9ef03b3cd47702aa15d31f4c0dad3.tar.gz
* ali.adb: Type reference does not reset current file.
* ali.adb: Recognize and scan renaming reference * ali.ads: Add spec for storing renaming references. * lib-xref.ads: Add documentation for handling of renaming references * lib-xref.adb: Implement output of renaming reference. * checks.adb: (Determine_Range): Document local variables (Determine_Range): Make sure Hbound is initialized. It looks as though there could be a real problem here with an uninitialized reference to Hbound, but no actual example of failure has been found. * g-socket.ads: Fix comment of Shutdown_Socket and Close_Socket. These functions should not fail silently because if they are called twice, this probably means that there is a race condition in the user program. Anyway, this behaviour is consistent with the rest of this unit. When an error occurs, an exception is raised with the error message as exception message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-xref.ads')
-rw-r--r--gcc/ada/lib-xref.ads52
1 files changed, 34 insertions, 18 deletions
diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads
index 2d5566c5271..396d8468ee8 100644
--- a/gcc/ada/lib-xref.ads
+++ b/gcc/ada/lib-xref.ads
@@ -56,7 +56,7 @@ package Lib.Xref is
--
-- The lines following the header look like
--
- -- line type col level entity typeref ref ref ref
+ -- line type col level entity renameref typeref ref ref ref
--
-- line is the line number of the referenced entity. It starts
-- in column one.
@@ -73,9 +73,24 @@ package Lib.Xref is
--
-- entity is the name of the referenced entity, with casing in
-- the canical casing for the source file where it is defined.
+
+ -- renameref provides information on renaming. If the entity is
+ -- a package, object or overloadable entity which is declared by
+ -- a renaming declaration, and the renaming refers to an entity
+ -- with a simple identifier or expanded name, then renameref has
+ -- the form:
+ --
+ -- =line:col
+ --
+ -- Here line:col give the reference to the identifier that
+ -- appears in the renaming declaration. Note that we never need
+ -- a file entry, since this identifier is always in the current
+ -- file in which the entity is declared. Currently, renameref
+ -- appears only for the simple renaming case. If the renaming
+ -- reference is a complex expressions, then renameref is omitted.
--
- -- typeref is the reference for the type. This part is optional.
- -- It is present for the following cases:
+ -- typeref is the reference for a related type. This part is
+ -- optional. It is present for the following cases:
--
-- derived types (points to the parent type) LR=<>
-- access types (points to designated type) LR=()
@@ -84,20 +99,20 @@ package Lib.Xref is
-- enumeration literals (points to enum type) LR={}
-- objects and components (points to type) LR={}
--
- -- In the above list LR shows the brackets used in the output,
- -- which has one of the two following forms:
+ -- In the above list LR shows the brackets used in the output,
+ -- which has one of the two following forms:
--
- -- L file | line type col R user entity
- -- L name-in-lower-case R standard entity
+ -- L file | line type col R user entity
+ -- L name-in-lower-case R standard entity
--
- -- For the form for a user entity, file is the dependency number
- -- of the file containing the declaration of the parent type. This
- -- number and the following vertical bar are omitted if the relevant
- -- type is defined in the same file as the current entity. The line,
- -- type, col are defined as previously described, and specify the
- -- location of the relevant type declaration in the referenced file.
- -- For the standard entity form, the name between the brackets is
- -- the normal name of the entity in lower case letters.
+ -- For the form for a user entity, file is the dependency number
+ -- of the file containing the declaration of the related type.
+ -- This number and the following vertical bar are omitted if the
+ -- relevant type is defined in the same file as the current entity.
+ -- The line, type, col are defined as previously described, and
+ -- specify the location of the relevant type declaration in the
+ -- referenced file. For the standard entity form, the name between
+ -- the brackets is the normal name of the entity in lower case.
--
-- There may be zero or more ref entries on each line
--
@@ -201,11 +216,12 @@ package Lib.Xref is
--
-- a reference on line 11, column 56 of unit number 3
--
- -- 2U13 p3 5b13 8r4 12r13 12t15
+ -- 2U13 p3=2:35 5b13 8r4 12r13 12t15
--
-- This line gives references for the non-publicly visible
- -- procedure p3 declared on line 2, column 13. There are
- -- four references:
+ -- procedure p3 declared on line 2, column 13. This procedure
+ -- renames the procedure whose identifier reference is at
+ -- line 2 column 35. There are four references:
--
-- the corresponding body entity at line 5, column 13,
-- of the current file.