gcc/libcpp
Nathan Sidwell bf425849f1 preprocessor: main-file cleanup
In preparing module patch 7 I realized there was a cleanup I could
make to simplify it.  This is that cleanup.  Also, when doing the
cleanup I noticed some macros had been turned into inline functions,
but not renamed to the preprocessors internal namespace
(_cpp_$INTERNAL rather than cpp_$USER).  Thus, this renames those
functions, deletes an internal field of the file structure, and
determines whether we're in the main file by comparing to
pfile->main_file, the _cpp_file of the main file.

	libcpp/
	* internal.h (cpp_in_system_header): Rename to ...
	(_cpp_in_system_header): ... here.
	(cpp_in_primary_file): Rename to ...
	(_cpp_in_main_source_file): ... here.  Compare main_file equality
	and check main_search value.
	* lex.c (maybe_va_opt_error, _cpp_lex_direct): Adjust for rename.
	* macro.c (_cpp_builtin_macro_text): Likewise.
	(replace_args): Likewise.
	* directives.c (do_include_next): Likewise.
	(do_pragma_once, do_pragma_system_header): Likewise.
	* files.c (struct _cpp_file): Delete main_file field.
	(pch_open): Check pfile->main_file equality.
	(make_cpp_file): Drop cpp_reader parm, don't set main_file.
	(_cpp_find_file): Adjust.
	(_cpp_stack_file): Check pfile->main_file equality.
	(struct report_missing_guard_data): Add cpp_reader field.
	(report_missing_guard): Check pfile->main_file equality.
	(_cpp_report_missing_guards): Adjust.
2020-11-19 04:47:00 -08:00
..
include preprocessor: C++ module-directives 2020-11-18 10:24:12 -08:00
po
aclocal.m4
ChangeLog Daily bump. 2020-11-19 00:16:30 +00:00
ChangeLog.jit
charset.c
config.in
configure Require CET support only for the final GCC build 2020-07-30 05:36:24 -07:00
configure.ac
directives.c preprocessor: main-file cleanup 2020-11-19 04:47:00 -08:00
errors.c
expr.c c: C2x binary constants 2020-11-13 22:45:22 +00:00
files.c preprocessor: main-file cleanup 2020-11-19 04:47:00 -08:00
generated_cpp_wcwidth.h libcpp: Update cpp_wcwidth() to Unicode 13.0.0 2020-11-07 09:36:43 -05:00
identifiers.c
init.c preprocessor: C++ module-directives 2020-11-18 10:24:12 -08:00
internal.h preprocessor: main-file cleanup 2020-11-19 04:47:00 -08:00
lex.c preprocessor: main-file cleanup 2020-11-19 04:47:00 -08:00
line-map.c preprocessor: module line maps 2020-11-17 08:10:56 -08:00
location-example.txt
macro.c preprocessor: main-file cleanup 2020-11-19 04:47:00 -08:00
Makefile.in
makeucnid.c
mkdeps.c preprocessor: Update mkdeps for modules 2020-11-18 08:44:49 -08:00
pch.c
symtab.c
system.h
traditional.c c: C2x __has_c_attribute 2020-11-12 21:13:51 +00:00
ucnid.h
ucnid.tab