aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2019-10-10 15:24:06 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-10-10 15:24:06 +0000
commita871b0aa6234573b8e7ec3d876c31f60e45e700f (patch)
tree7e9fa989a7f22b4474fc208f554d2f68d130dbe5
parentf18344b78d624afadca4c13bcca99d3a159135ec (diff)
downloadgcc-a871b0aa6234573b8e7ec3d876c31f60e45e700f.zip
gcc-a871b0aa6234573b8e7ec3d876c31f60e45e700f.tar.gz
gcc-a871b0aa6234573b8e7ec3d876c31f60e45e700f.tar.bz2
[Ada] Debug procedure for printing ancestors
2019-10-10 Bob Duff <duff@adacore.com> gcc/ada/ * treepr.ads, treepr.adb (ppar): New procedure. From-SVN: r276826
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/treepr.adb8
-rw-r--r--gcc/ada/treepr.ads4
3 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4685380..16d900a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,7 +1,3 @@
2019-10-10 Bob Duff <duff@adacore.com>
- * sem_aggr.adb (Resolve_Aggregate): Add missing cases in the
- Others_Allowed => True case -- N_Case_Expression_Alternative and
- N_If_Expression. Use Nkind_In.
- * atree.adb, atree.ads, sinfo.adb, sinfo.ads (Nkind_In): New
- 16-parameter version. \ No newline at end of file
+ * treepr.ads, treepr.adb (ppar): New procedure. \ No newline at end of file
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
index 959b990..55ecbdb 100644
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -242,6 +242,14 @@ package body Treepr is
function par (N : Union_Id) return Node_Or_Entity_Id renames p;
+ procedure ppar (N : Union_Id) is
+ begin
+ if N /= Empty_List_Or_Node then
+ pp (N);
+ ppar (Union_Id (p (N)));
+ end if;
+ end ppar;
+
--------
-- pe --
--------
diff --git a/gcc/ada/treepr.ads b/gcc/ada/treepr.ads
index a299250..a63329b 100644
--- a/gcc/ada/treepr.ads
+++ b/gcc/ada/treepr.ads
@@ -82,6 +82,10 @@ package Treepr is
-- the definition of Union_Id. Historically this was only for printing
-- nodes, hence the name.
+ procedure ppar (N : Union_Id);
+ pragma Export (Ada, ppar);
+ -- Print the node, its parent, its parent's parent, and so on
+
procedure pt (N : Union_Id);
procedure ppp (N : Union_Id);
pragma Export (Ada, pt);