diff options
Diffstat (limited to 'gcc/c-pch.c')
-rw-r--r-- | gcc/c-pch.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/c-pch.c b/gcc/c-pch.c index 2cd9b9d1a2d..23ab0f8454a 100644 --- a/gcc/c-pch.c +++ b/gcc/c-pch.c @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "c-pragma.h" #include "ggc.h" #include "langhooks.h" +#include "hosthooks.h" struct c_pch_validity { @@ -164,9 +165,6 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd) const char *pch_ident; struct c_pch_validity v; - if (! allow_pch) - return 2; - /* Perform a quick test of whether this is a valid precompiled header for the current language. */ @@ -244,7 +242,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name, return; } - allow_pch = 0; + cpp_get_callbacks (parse_in)->valid_pch = NULL; if (fread (&h, sizeof (h), 1, f) != 1) { @@ -274,3 +272,15 @@ c_common_read_pch (cpp_reader *pfile, const char *name, fclose (f); } + +/* Indicate that no more PCH files should be read. */ + +void +c_common_no_more_pch (void) +{ + if (cpp_get_callbacks (parse_in)->valid_pch) + { + cpp_get_callbacks (parse_in)->valid_pch = NULL; + host_hooks.gt_pch_use_address (NULL, 0); + } +} |