r275034 - in /trunk/libcpp: ChangeLog files.c i...

nathan@gcc.gnu.org nathan@gcc.gnu.org
Thu Aug 29 14:06:00 GMT 2019


Author: nathan
Date: Thu Aug 29 14:06:32 2019
New Revision: 275034

URL: https://gcc.gnu.org/viewcvs?rev=275034&root=gcc&view=rev
Log:
[preprocessor] Include stacking

https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01971.html
	* internal.h (enum include_type): Add IT_MAIN, IT_DIRECTIVE_HWM,
	IT_HEADER_HWM.
	(_cpp_stack_file): Take include_type, not a bool.
	* files.c (_cpp_find_file): Refactor to not hide an if inside a
	for conditional.
	(should_stack_file): Break apart to ...
	(is_known_idempotent_file, has_unique_contents): ... these.
	(_cpp_stack_file): Replace IMPORT boolean with include_type enum.
	Refactor to use new predicates.  Do linemap compensation here ...
	(_cpp_stack_include): ... not here.
	* init.c (cpp_read_main_file): Pass IT_MAIN to _cpp_stack_file.

Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/files.c
    trunk/libcpp/init.c
    trunk/libcpp/internal.h



More information about the Gcc-cvs mailing list