[PR93306] Short-circuit has_include
authorNathan Sidwell <nathan@acm.org>
Fri, 17 Jan 2020 13:39:47 +0000 (05:39 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 17 Jan 2020 13:44:30 +0000 (05:44 -0800)
commitbf09d886a4be1031f7003073115af6cbc5575353
treeeef353351a64157dbc3f1637cc0222db4d3cb17f
parent5f0303833d542b273da33e4b149974e739d350e5
[PR93306] Short-circuit has_include

the preprocessor evaluator has a skip_eval counter, but we weren't
checking it after parsing has_include(foo), but before looking for
foo.  Resulting in unnecessary io for 'FALSE_COND && has_include <foo>'

PR preprocessor/93306
* expr.c (parse_has_include): Refactor.  Check skip_eval before
looking.
libcpp/ChangeLog
libcpp/expr.c