From dc3f38050535e8904dce2fd02c6efb6cf91eea3d Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 20 Dec 2017 12:51:57 +0000 Subject: poly_int: dump routines 2017-12-20 Richard Sandiford Alan Hayward David Sherwood gcc/ * dumpfile.h (dump_dec): Declare. * dumpfile.c (dump_dec): New function. * pretty-print.h (pp_wide_integer): Turn into a function and declare a poly_int version. * pretty-print.c (pp_wide_integer): New function for poly_ints. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r255864 --- gcc/pretty-print.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc/pretty-print.h') diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index 9f6e2bb..92d1d8e 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -328,8 +328,6 @@ pp_get_prefix (const pretty_printer *pp) { return pp->prefix; } pp_string (PP, pp_buffer (PP)->digit_buffer); \ } \ while (0) -#define pp_wide_integer(PP, I) \ - pp_scalar (PP, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) I) #define pp_pointer(PP, P) pp_scalar (PP, "%p", P) #define pp_identifier(PP, ID) pp_string (PP, (pp_translate_identifiers (PP) \ @@ -404,4 +402,15 @@ extern const char *identifier_to_locale (const char *); extern void *(*identifier_to_locale_alloc) (size_t); extern void (*identifier_to_locale_free) (void *); +/* Print I to PP in decimal. */ + +inline void +pp_wide_integer (pretty_printer *pp, HOST_WIDE_INT i) +{ + pp_scalar (pp, HOST_WIDE_INT_PRINT_DEC, i); +} + +template +void pp_wide_integer (pretty_printer *pp, const poly_int_pod &); + #endif /* GCC_PRETTY_PRINT_H */ -- cgit v1.1