+2017-10-18 Aldy Hernandez <aldyh@redhat.com>
+
+ * wide-int.cc (debug) [const wide_int &]: New.
+ (debug) [const wide_int *]: New.
+ (debug) [const widest_int &]: New.
+ (debug) [const widest_int *]: New.
+
2017-10-18 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/82556
template void offset_int::dump () const;
template void widest_int::dump () const;
+/* We could add all the above ::dump variants here, but wide_int and
+ widest_int should handle the common cases. Besides, you can always
+ call the dump method directly. */
+
+DEBUG_FUNCTION void
+debug (const wide_int &ref)
+{
+ ref.dump ();
+}
+
+DEBUG_FUNCTION void
+debug (const wide_int *ptr)
+{
+ if (ptr)
+ debug (*ptr);
+ else
+ fprintf (stderr, "<nil>\n");
+}
+
+DEBUG_FUNCTION void
+debug (const widest_int &ref)
+{
+ ref.dump ();
+}
+
+DEBUG_FUNCTION void
+debug (const widest_int *ptr)
+{
+ if (ptr)
+ debug (*ptr);
+ else
+ fprintf (stderr, "<nil>\n");
+}
#if CHECKING_P