diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-16 00:56:17 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-16 00:56:17 +0000 |
commit | 159eb63c3b25db86cd2628b9bd105b03d7f07e71 (patch) | |
tree | 3003511da2454d74ebb9520df6ddedbf1690fdaf /gcc/ada/lib-xref.adb | |
parent | 050fb55b892a04419a03be5bdb755438a396085d (diff) | |
download | gcc-159eb63c3b25db86cd2628b9bd105b03d7f07e71.tar.gz |
* osint.adb(Create_Debug_File): When an object file is specified,
put the .dg file in the same directory as the object file.
* osint.adb: Minor reformatting
* lib-xref.adb (Output_Instantiation): New procedure to generate
instantiation references.
* lib-xref.ads: Add documentation of handling of generic references.
* ali.adb (Read_Instantiation_Ref): New procedure to read
instantiation references
* ali.ads: Add spec for storing instantiation references
* bindusg.adb: Minor reformatting
* switch.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5)
* usage.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5)
* gnatcmd.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5)
* csets.adb: Add entry for Latin-5 (Cyrillic ISO-8859-5)
* csets.ads:
Fix header format
Add 2001 to copyright date
Add entry for Latin-5 (Cyrillic ISO-8859-5)
* adaint.c: mktemp is a macro on Lynx and can not be used as an
expression.
* misc.c (gnat_expand_constant): Do not strip UNCHECKED_CONVERT_EXPR
if operand is CONSTRUCTOR.
* trans.c (tree_transform, case N_Assignment_Statement): Set lineno
before emiting check on right-hand side, so that exception information
is correct.
* utils.c (create_var_decl): Throw away initializing expression
if just annotating types and non-constant.
* prj-nmsc.adb: (Ada_Check): Migrate drom Ada_Default_... to
Default_Ada_...
* prj.adb: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix):
Remove functions.
(Default_Ada_Spec_Suffix, Default_Ada_Impl_Suffix): Move to spec.
* prj.ads: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix):
Remove functions.
(Default_Ada_Spec_Suffix, Default_Ada_Impl_Suffix): Move from body.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r-- | gcc/ada/lib-xref.adb | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index c5b5b7d532c..931e02fda75 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -481,7 +481,9 @@ package body Lib.Xref is Crloc := No_Location; for Refno in 1 .. Nrefs loop - declare + + Output_One_Ref : declare + XE : Xref_Entry renames Xrefs.Table (Rnums (Refno)); -- The current entry to be accessed @@ -498,6 +500,57 @@ package body Lib.Xref is Right : Character; -- Used for {} or <> for type reference + procedure Output_Instantiation_Refs (Loc : Source_Ptr); + -- Recursive procedure to output instantiation references for + -- the given source ptr in [file|line[...]] form. No output + -- if the given location is not a generic template reference. + + ------------------------------- + -- Output_Instantiation_Refs -- + ------------------------------- + + procedure Output_Instantiation_Refs (Loc : Source_Ptr) is + Iloc : constant Source_Ptr := Instantiation_Location (Loc); + Lun : Unit_Number_Type; + + begin + -- Nothing to do if this is not an instantiation + + if Iloc = No_Location then + return; + end if; + + -- For now, nothing to do unless special debug flag set + + if not Debug_Flag_MM then + return; + end if; + + -- Output instantiation reference + + Write_Info_Char ('['); + Lun := Get_Source_Unit (Iloc); + + if Lun /= Curru then + Curru := XE.Lun; + Write_Info_Nat (Dependency_Num (Curru)); + Write_Info_Char ('|'); + end if; + + Write_Info_Nat (Int (Get_Logical_Line_Number (Iloc))); + + -- Recursive call to get nested instantiations + + Output_Instantiation_Refs (Iloc); + + -- Output final ] after call to get proper nesting + + Write_Info_Char (']'); + return; + end Output_Instantiation_Refs; + + -- Start of processing for Output_One_Ref + begin Ent := XE.Ent; Ctyp := Xref_Entity_Letters (Ekind (Ent)); @@ -841,9 +894,11 @@ package body Lib.Xref is Write_Info_Nat (Int (Get_Logical_Line_Number (XE.Loc))); Write_Info_Char (XE.Typ); Write_Info_Nat (Int (Get_Column_Number (XE.Loc))); + + Output_Instantiation_Refs (Sloc (XE.Ent)); end if; end if; - end; + end Output_One_Ref; <<Continue>> null; |