r262229 - in /branches/c++-modules: ChangeLog.m...
nathan@gcc.gnu.org
nathan@gcc.gnu.org
Thu Jun 28 19:07:00 GMT 2018
Author: nathan
Date: Thu Jun 28 19:07:07 2018
New Revision: 262229
URL: https://gcc.gnu.org/viewcvs?rev=262229&root=gcc&view=rev
Log:
(Beginnings of) Include diversion.
gcc/c-family/
* c-opts.c (c_common_post_options): Set divert_include hook.
(cb_file_change): Fixup precedence.
gcc/cp/
* cp-lang.c (LANG_HOOKS_PREPROCESS_DIVERT_INCLUDE): Override.
* cp-tree.h (modules_header_p): New.
(atom_divert_include): Declare.
* cxx-mapper.cc (flag_fallback): New flag.
(module2bmi): Deal with NULL names.
(buffer::get_request): Fix off-by-one error.
(read_mapping_file): Can be multiply called. Target file name can
be null.
(client::action): Deal with INCLUDE.
(main): There can be may files after connection. Fixup networking
errors.
* lex.c (atom_preamble_prefix_peek): Don't rescan legacy header
module.
* module.c (module_preamble_end_loc): Declare here.
(module_mapper::module_mapper): Prepend path for anything looking
defaulty.
(module_mapper::divert_include): New.
(do_divert_include): New.
(atom_divert_include): New.
(init_module_processing): Set header mode here.
* parser.c (module_preamble_end_loc): Extern.
gcc/
* doc/invoke.text (C++ Modules): Document -fmodule-header.
* langhooks-def.h (LANG_HOOKS_PREPROCESS_DIVERT_INCLUDE): Provide
default.
* langhooks.h (lang_hooks): Add preprocess_divert_include.
libcpp/
* directives.c (do_include_common): Add diversion smarts.
* include/cpplib.h (cpp_divert_include_t): New.
(struct cpp_callbacks): Add divert_include.
* line-map.c (linemap_module_loc): Missed commit.
gcc/testsuite/
* g++.dg/modules/legacy-2.*: New.
* g++.dg/modules/modules.exp: Fixup header compilation.
Added:
branches/c++-modules/gcc/testsuite/g++.dg/modules/legacy-2.h
branches/c++-modules/gcc/testsuite/g++.dg/modules/legacy-2.map
branches/c++-modules/gcc/testsuite/g++.dg/modules/legacy-2_a.H
branches/c++-modules/gcc/testsuite/g++.dg/modules/legacy-2_b.H
branches/c++-modules/gcc/testsuite/g++.dg/modules/legacy-2_c.C
branches/c++-modules/gcc/testsuite/g++.dg/modules/legacy-2_d.C
Modified:
branches/c++-modules/ChangeLog.modules
branches/c++-modules/gcc/c-family/c-opts.c
branches/c++-modules/gcc/cp/cp-lang.c
branches/c++-modules/gcc/cp/cp-tree.h
branches/c++-modules/gcc/cp/cxx-mapper.cc
branches/c++-modules/gcc/cp/lex.c
branches/c++-modules/gcc/cp/module.c
branches/c++-modules/gcc/cp/parser.c
branches/c++-modules/gcc/doc/invoke.texi
branches/c++-modules/gcc/langhooks-def.h
branches/c++-modules/gcc/langhooks.h
branches/c++-modules/gcc/testsuite/g++.dg/modules/modules.exp
branches/c++-modules/libcpp/directives.c
branches/c++-modules/libcpp/files.c
branches/c++-modules/libcpp/include/cpplib.h
branches/c++-modules/libcpp/line-map.c
More information about the Gcc-cvs
mailing list