[preprocessor] Include stacking

Nathan Sidwell nathan@acm.org
Thu Aug 29 14:59:00 GMT 2019


This patch refactors pieces of the include stacking routines.  Again 
from the modules branch, so these happen to provide the right slots to 
make that work, but I think they're good in their own right.

_cpp_find_file excitingly hid an if as the loop-invariant conditional of 
a for.  Refactored that, so mostly just changing indentation.

_should_stack_file was confusing, and I broke it apart into two 
predicates, then called from _stack_file.

Finally I extended the include_type enum to add IT_MAIN, for the main 
file, which means _cpp_stack_include just passes the include type down 
to _cpp_stack_file.

Applying to trunk.

nathan
-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fstack.diff
Type: text/x-patch
Size: 15874 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190829/c78a7cba/attachment.bin>


More information about the Gcc-patches mailing list