aboutsummaryrefslogtreecommitdiff
path: root/libcpp/init.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2019-08-29 14:06:32 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2019-08-29 14:06:32 +0000
commitb0d11f1ed68727a85280e0ceb83bf77b5385902a (patch)
treed343c7483c9b5485fe33ff454c466a9d24d4f765 /libcpp/init.c
parentd02a0412422b144f6e84605997302a1c36e81600 (diff)
downloadgcc-b0d11f1ed68727a85280e0ceb83bf77b5385902a.zip
gcc-b0d11f1ed68727a85280e0ceb83bf77b5385902a.tar.gz
gcc-b0d11f1ed68727a85280e0ceb83bf77b5385902a.tar.bz2
[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. From-SVN: r275034
Diffstat (limited to 'libcpp/init.c')
-rw-r--r--libcpp/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/init.c b/libcpp/init.c
index 472f104..ccbfc96 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -651,7 +651,7 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname)
if (_cpp_find_failed (pfile->main_file))
return NULL;
- _cpp_stack_file (pfile, pfile->main_file, false, loc);
+ _cpp_stack_file (pfile, pfile->main_file, IT_MAIN, 0);
/* For foo.i, read the original filename foo.c now, for the benefit
of the front ends. */