summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 83008da3a6b..f22c4d5bebd 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);