summaryrefslogtreecommitdiff
path: root/gcc/ada/uname.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:19:40 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:19:40 +0000
commitc2052d920b49395f766c1a47448d02f8896296e2 (patch)
tree2c708600f1cac4ba92be2eb201eabd01f089e8cf /gcc/ada/uname.adb
parentfa7571cb7857050d2dbd9e1657baa6385b5f5475 (diff)
downloadgcc-c2052d920b49395f766c1a47448d02f8896296e2.tar.gz
2007-04-20 Vincent Celier <celier@adacore.com>
Robert Dewar <dewar@adacore.com> * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb, butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads, err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads, fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads, lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads, makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb, par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb, prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads, prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb, sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb, uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb, ali.ads, ali.adb: Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to package Namet. Make File_Name_Type and Unit_Name_Type types derived from Mame_Id. Add new type Path_Name_Type, also derived from Name_Id. Use variables of types File_Name_Type and Unit_Name_Type in error messages. (Get_Name): Add parameter Ignore_Special, and set it reading file name (New_Copy): When debugging the compiler, call New_Node_Debugging_Output here. Define flags Flag217-Flag230 with associated subprograms (Flag_Word5): New record type. (Flag_Word5_Ptr): New access type. (To_Flag_Word5): New unchecked conversion. (To_Flag_Word5_Ptr): Likewise. (Flag216): New function. (Set_Flag216): New procedure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125377 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/uname.adb')
-rw-r--r--gcc/ada/uname.adb28
1 files changed, 19 insertions, 9 deletions
diff --git a/gcc/ada/uname.adb b/gcc/ada/uname.adb
index ee000d48fe6..f0873229a55 100644
--- a/gcc/ada/uname.adb
+++ b/gcc/ada/uname.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2007, 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- --
@@ -36,7 +36,6 @@ with Casing; use Casing;
with Einfo; use Einfo;
with Hostparm;
with Lib; use Lib;
-with Namet; use Namet;
with Nlists; use Nlists;
with Output; use Output;
with Sinfo; use Sinfo;
@@ -138,7 +137,7 @@ package body Uname is
while Name_Buffer (Name_Len) /= '.' loop
if Name_Len = 1 then
- return No_Name; -- not a child or subunit name
+ return No_Unit_Name;
else
Name_Len := Name_Len - 1;
end if;
@@ -425,7 +424,10 @@ package body Uname is
-- Get_Unit_Name_String --
--------------------------
- procedure Get_Unit_Name_String (N : Unit_Name_Type) is
+ procedure Get_Unit_Name_String
+ (N : Unit_Name_Type;
+ Suffix : Boolean := True)
+ is
Unit_Is_Body : Boolean;
begin
@@ -447,10 +449,12 @@ package body Uname is
-- Now adjust the %s or %b to (spec) or (body)
- if Unit_Is_Body then
- Name_Buffer (Name_Len - 1 .. Name_Len + 5) := " (body)";
- else
- Name_Buffer (Name_Len - 1 .. Name_Len + 5) := " (spec)";
+ if Suffix then
+ if Unit_Is_Body then
+ Name_Buffer (Name_Len - 1 .. Name_Len + 5) := " (body)";
+ else
+ Name_Buffer (Name_Len - 1 .. Name_Len + 5) := " (spec)";
+ end if;
end if;
for J in 1 .. Name_Len loop
@@ -459,7 +463,13 @@ package body Uname is
end if;
end loop;
- Name_Len := Name_Len + (7 - 2);
+ -- Adjust Name_Len
+
+ if Suffix then
+ Name_Len := Name_Len + (7 - 2);
+ else
+ Name_Len := Name_Len - 2;
+ end if;
end Get_Unit_Name_String;
------------------