diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-05-26 19:55:51 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-05-26 19:55:51 +0100 |
commit | ab9b814d258a26fc74f370b8fdb2b9250088794c (patch) | |
tree | 8ae9afd49a97e37e10c11657a0e4da727f351258 /gcc/toplev.c | |
parent | bdd715238c97721534b7f7fd8e915ba045b6d2dc (diff) | |
download | gcc-ab9b814d258a26fc74f370b8fdb2b9250088794c.zip gcc-ab9b814d258a26fc74f370b8fdb2b9250088794c.tar.gz gcc-ab9b814d258a26fc74f370b8fdb2b9250088794c.tar.bz2 |
pretty-print.c: Don't include ggc.h.
* pretty-print.c: Don't include ggc.h.
(identifier_to_locale_alloc, identifier_to_locale_free): Define.
(identifier_to_locale): Use them for allocation.
* pretty-print.h (identifier_to_locale_alloc,
identifier_to_locale_free): Declare.
* toplev.c (alloc_for_identifier_to_locale): New.
(general_init): Set identifier_to_locale_alloc and
identifier_to_locale_free.
* Makefile.in (pretty-print.o): Update dependencies.
From-SVN: r159898
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 83008da..f22c4d5 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1668,6 +1668,14 @@ realloc_for_line_map (void *ptr, size_t len) return ggc_realloc (ptr, len); } +/* A helper function: used as the allocator function for + identifier_to_locale. */ +static void * +alloc_for_identifier_to_locale (size_t len) +{ + return ggc_alloc (len); +} + /* Initialization of the front end environment, before command line options are parsed. Signal handlers, internationalization etc. ARGV0 is main's argv[0]. */ @@ -1690,6 +1698,9 @@ general_init (const char *argv0) gcc_init_libintl (); + identifier_to_locale_alloc = alloc_for_identifier_to_locale; + identifier_to_locale_free = ggc_free; + /* Initialize the diagnostics reporting machinery, so option parsing can give warnings and errors. */ diagnostic_initialize (global_dc, N_OPTS); |