aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/treepr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-12-12 12:49:31 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2011-12-12 12:49:31 +0100
commitee1a757231c05815f7e2f9e5e0ced98b380c0416 (patch)
treec5a05d81342446366f864e0be7b46fe5f6196617 /gcc/ada/treepr.adb
parente8bd500e2dcdfdd5f798e403662942d0dc3d6a86 (diff)
downloadgcc-ee1a757231c05815f7e2f9e5e0ced98b380c0416.zip
gcc-ee1a757231c05815f7e2f9e5e0ced98b380c0416.tar.gz
gcc-ee1a757231c05815f7e2f9e5e0ced98b380c0416.tar.bz2
[multiple changes]
2011-12-12 Thomas Quinot <quinot@adacore.com> * exp_disp.adb: Minor reformatting. 2011-12-12 Tristan Gingold <gingold@adacore.com> * gnatls.adb (Search_RTS): New procedure. (Scan_Ls_Arg): Move code that search the RTS. (Gnatls): search the RTS later. * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function. 2011-12-12 Ed Falis <falis@adacore.com> * sysdep.c: Fix treatment of VxWorks task options so that run-times built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK. 2011-12-12 Bob Duff <duff@adacore.com> * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads: Minor cleanup and fiddling with debug printouts. 2011-12-12 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Get_Directories): For a non extending project, always get a declared object and/or exec directory if it already exists, even when there are no sources, but do not create them. 2011-12-12 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve): Deal with the case where an abstract operator is called with operands of type universal_integer. 2011-12-12 Thomas Quinot <quinot@adacore.com> * par_sco.adb: Minor fix to dominance marker referencing WHILE decision. From-SVN: r182227
Diffstat (limited to 'gcc/ada/treepr.adb')
-rw-r--r--gcc/ada/treepr.adb108
1 files changed, 65 insertions, 43 deletions
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
index 684cccd..ed827cc 100644
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -138,6 +138,9 @@ package body Treepr is
-- Print name from names table if currently in print phase, noop if in
-- marking phase. Note that the name is output in mixed case mode.
+ procedure Print_Node_Header (N : Node_Id);
+ -- Print header line used by Print_Node and Print_Node_Briefly
+
procedure Print_Node_Kind (N : Node_Id);
-- Print node kind name in mixed case if in print phase, noop if in
-- marking phase.
@@ -885,7 +888,6 @@ package body Treepr is
Prefix_Str_Char : String (Prefix_Str'First .. Prefix_Str'Last + 1);
Sfile : Source_File_Index;
- Notes : Boolean;
Fmt : UI_Format;
begin
@@ -905,48 +907,7 @@ package body Treepr is
-- Print header line
Print_Str (Prefix_Str);
- Print_Node_Ref (N);
-
- Notes := False;
-
- if N > Atree_Private_Part.Nodes.Last then
- Print_Str (" (no such node)");
- Print_Eol;
- return;
- end if;
-
- if Comes_From_Source (N) then
- Notes := True;
- Print_Str (" (source");
- end if;
-
- if Analyzed (N) then
- if not Notes then
- Notes := True;
- Print_Str (" (");
- else
- Print_Str (",");
- end if;
-
- Print_Str ("analyzed");
- end if;
-
- if Error_Posted (N) then
- if not Notes then
- Notes := True;
- Print_Str (" (");
- else
- Print_Str (",");
- end if;
-
- Print_Str ("posted");
- end if;
-
- if Notes then
- Print_Char (')');
- end if;
-
- Print_Eol;
+ Print_Node_Header (N);
if Is_Rewrite_Substitution (N) then
Print_Str (Prefix_Str);
@@ -1275,6 +1236,67 @@ package body Treepr is
end if;
end Print_Node;
+ ------------------------
+ -- Print_Node_Briefly --
+ ------------------------
+
+ procedure Print_Node_Briefly (N : Node_Id) is
+ begin
+ Printing_Descendants := False;
+ Phase := Printing;
+ Print_Node_Header (N);
+ end Print_Node_Briefly;
+
+ -----------------------
+ -- Print_Node_Header --
+ -----------------------
+
+ procedure Print_Node_Header (N : Node_Id) is
+ Notes : Boolean := False;
+
+ begin
+ Print_Node_Ref (N);
+
+ if N > Atree_Private_Part.Nodes.Last then
+ Print_Str (" (no such node)");
+ Print_Eol;
+ return;
+ end if;
+
+ if Comes_From_Source (N) then
+ Notes := True;
+ Print_Str (" (source");
+ end if;
+
+ if Analyzed (N) then
+ if not Notes then
+ Notes := True;
+ Print_Str (" (");
+ else
+ Print_Str (",");
+ end if;
+
+ Print_Str ("analyzed");
+ end if;
+
+ if Error_Posted (N) then
+ if not Notes then
+ Notes := True;
+ Print_Str (" (");
+ else
+ Print_Str (",");
+ end if;
+
+ Print_Str ("posted");
+ end if;
+
+ if Notes then
+ Print_Char (')');
+ end if;
+
+ Print_Eol;
+ end Print_Node_Header;
+
---------------------
-- Print_Node_Kind --
---------------------