+2013-07-13 Jason Merrill <jason@redhat.com>
+
+ * print-tree.c (debug_vec_tree): Use debug_raw.
+ (debug_raw (vec<tree, va_gc> &)): New.
+ (debug_raw (vec<tree, va_gc> *)): New.
+ * tree.h: Declare them.
+
2013-07-13 Bin Cheng <bin.cheng@arm.com>
* ifcvt.c (ifcvt_after_combine): New static variable.
down to a depth of six. */
DEBUG_FUNCTION void
-debug_vec_tree (vec<tree, va_gc> *vec)
+debug_raw (vec<tree, va_gc> &ref)
{
tree elt;
unsigned ix;
/* Print the slot this node is in, and its code, and address. */
fprintf (stderr, "<VEC");
- dump_addr (stderr, " ", vec->address ());
+ dump_addr (stderr, " ", ref.address ());
- FOR_EACH_VEC_ELT (*vec, ix, elt)
+ FOR_EACH_VEC_ELT (ref, ix, elt)
{
fprintf (stderr, "elt %d ", ix);
- debug (elt);
+ debug_raw (elt);
}
}
DEBUG_FUNCTION void
debug (vec<tree, va_gc> &ref)
{
- debug_vec_tree (&ref);
+ tree elt;
+ unsigned ix;
+
+ /* Print the slot this node is in, and its code, and address. */
+ fprintf (stderr, "<VEC");
+ dump_addr (stderr, " ", ref.address ());
+
+ FOR_EACH_VEC_ELT (ref, ix, elt)
+ {
+ fprintf (stderr, "elt %d ", ix);
+ debug (elt);
+ }
}
DEBUG_FUNCTION void
else
fprintf (stderr, "<nil>\n");
}
+
+DEBUG_FUNCTION void
+debug_raw (vec<tree, va_gc> *ptr)
+{
+ if (ptr)
+ debug_raw (*ptr);
+ else
+ fprintf (stderr, "<nil>\n");
+}
+
+DEBUG_FUNCTION void
+debug_vec_tree (vec<tree, va_gc> *vec)
+{
+ debug_raw (vec);
+}
extern void debug_vec_tree (vec<tree, va_gc> *);
extern void debug (vec<tree, va_gc> &ref);
extern void debug (vec<tree, va_gc> *ptr);
+extern void debug_raw (vec<tree, va_gc> &ref);
+extern void debug_raw (vec<tree, va_gc> *ptr);
#ifdef BUFSIZ
extern void dump_addr (FILE*, const char *, const void *);
extern void print_node (FILE *, const char *, tree, int);