diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-12-20 12:51:57 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-12-20 12:51:57 +0000 |
commit | dc3f38050535e8904dce2fd02c6efb6cf91eea3d (patch) | |
tree | 07db92271531d8b8b511202edb0dfe43cec24bc0 /gcc/pretty-print.h | |
parent | 36fd64086542ed734aded849304723218fa4d6fd (diff) | |
download | gcc-dc3f38050535e8904dce2fd02c6efb6cf91eea3d.zip gcc-dc3f38050535e8904dce2fd02c6efb6cf91eea3d.tar.gz gcc-dc3f38050535e8904dce2fd02c6efb6cf91eea3d.tar.bz2 |
poly_int: dump routines
2017-12-20 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
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 <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255864
Diffstat (limited to 'gcc/pretty-print.h')
-rw-r--r-- | gcc/pretty-print.h | 13 |
1 files changed, 11 insertions, 2 deletions
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<unsigned int N, typename T> +void pp_wide_integer (pretty_printer *pp, const poly_int_pod<N, T> &); + #endif /* GCC_PRETTY_PRINT_H */ |