aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/xref_lib.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2010-06-23 08:53:09 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 10:53:09 +0200
commitd92eccc3593dc167d5b5f59f7493d0867dafbd80 (patch)
tree5c8053fc1d8e4b7124ba781806c74492cf8a0ed3 /gcc/ada/xref_lib.adb
parent7c4b480fb3736fd2a9f4fbad273dbafe04649c11 (diff)
downloadgcc-d92eccc3593dc167d5b5f59f7493d0867dafbd80.zip
gcc-d92eccc3593dc167d5b5f59f7493d0867dafbd80.tar.gz
gcc-d92eccc3593dc167d5b5f59f7493d0867dafbd80.tar.bz2
xr_tabls.adb, [...]: Update to latest lib-xref.ads Fix handling of parameters.
2010-06-23 Arnaud Charlet <charlet@adacore.com> * xr_tabls.adb, xref_lib.adb: Update to latest lib-xref.ads Fix handling of parameters. Add protection against unexpected cases. * sem_ch6.adb (Create_Extra_Formals): Use suffix "L" instead of "A" for access level, since "A" suffix is already used elsewhere. Similarly, use suffix "O" instead of "C" for 'Constrained since "C" suffix is used for xxx'Class. From-SVN: r161260
Diffstat (limited to 'gcc/ada/xref_lib.adb')
-rw-r--r--gcc/ada/xref_lib.adb30
1 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ada/xref_lib.adb b/gcc/ada/xref_lib.adb
index 77c0075..ed21356 100644
--- a/gcc/ada/xref_lib.adb
+++ b/gcc/ada/xref_lib.adb
@@ -508,6 +508,7 @@ package body Xref_Lib is
when 'D' => return "decimal type";
when 'E' => return "enumeration type";
when 'F' => return "float type";
+ when 'H' => return "abstract type";
when 'I' => return "integer type";
when 'M' => return "modular type";
when 'O' => return "fixed type";
@@ -523,7 +524,6 @@ package body Xref_Lib is
when 'd' => return Param_String & "decimal object";
when 'e' => return Param_String & "enumeration object";
when 'f' => return Param_String & "float object";
- when 'h' => return "interface";
when 'i' => return Param_String & "integer object";
when 'm' => return Param_String & "modular object";
when 'o' => return Param_String & "fixed object";
@@ -535,6 +535,8 @@ package body Xref_Lib is
when 'x' => return Param_String & "abstract procedure";
when 'y' => return Param_String & "abstract function";
+ when 'h' => return "interface";
+ when 'g' => return "macro";
when 'K' => return "package";
when 'k' => return "generic package";
when 'L' => return "statement label";
@@ -542,6 +544,7 @@ package body Xref_Lib is
when 'N' => return "named number";
when 'n' => return "enumeration literal";
when 'q' => return "block label";
+ when 'Q' => return "include file";
when 'U' => return "procedure";
when 'u' => return "generic procedure";
when 'V' => return "function";
@@ -557,7 +560,11 @@ package body Xref_Lib is
-- have an unknown Abbrev value
when others =>
- return "??? (" & Get_Type (Decl) & ")";
+ if Is_Parameter (Decl) then
+ return "parameter";
+ else
+ return "??? (" & Get_Type (Decl) & ")";
+ end if;
end case;
end Get_Full_Type;
@@ -1587,8 +1594,13 @@ package body Xref_Lib is
File := Get_File_Ref (Arr (R));
F := Osint.To_Host_File_Spec
(Get_Gnatchop_File (Arr (R), Full_Path_Name));
- Write_Str (F.all & ' ');
- Free (F);
+
+ if F = null then
+ Write_Str ("<unknown> ");
+ else
+ Write_Str (F.all & ' ');
+ Free (F);
+ end if;
end if;
Print_Ref (Get_Line (Arr (R)), Get_Column (Arr (R)));
@@ -1637,8 +1649,14 @@ package body Xref_Lib is
Write_Str (" Decl: ");
F := Osint.To_Host_File_Spec
(Get_Gnatchop_File (Decl, Full_Path_Name));
- Print80 (F.all & ' ');
- Free (F);
+
+ if F = null then
+ Print80 ("<unknown> ");
+ else
+ Print80 (F.all & ' ');
+ Free (F);
+ end if;
+
Print_Ref (Get_Line (Decl), Get_Column (Decl));
Print_List