r262183 - in /branches/c++-modules: ChangeLog.m...
nathan@gcc.gnu.org
nathan@gcc.gnu.org
Wed Jun 27 12:05:00 GMT 2018
Author: nathan
Date: Wed Jun 27 12:05:47 2018
New Revision: 262183
URL: https://gcc.gnu.org/viewcvs?rev=262183&root=gcc&view=rev
Log:
(Beginnings of) Legacy header modules
libcpp/
* line-map.c (linemap_module_loc): Expect ordinary loc.
gcc/
* langhooks-def.h (LANG_HOOKS_PREPROCESS_MAIN_FILE): Provide
default.
* langhooks.h (lang_hooks): Add preprocess_main_file hook.
gcc/c-family/
* c-opts.c (cb_file_change): Call new hook.
gcc/cp/
* cp-tree.h (enum atom_preamble_state): Define.
(atom_preamble_prefix_{peek,next}): Use enum.
(atom_main_file, maybe_atom_legacy_module): Declare.
* cxx-mapper.cc (module2bmi): Munge legacy module chars.
* lang-specs.h (@c++-header): Fix -fmodule-header use.
* lex.c (atom_preamble_prefix_{peek,next}): Adjust for enum.
* module.c (prefix_line_maps_hwm, prefix_locations_hwm): New.
(module_state::{read,write,prepare}_locations): Adjust prefix checking.
(ordinary_loc_of): New.
(import_module): Use it.
(declare_module): Set preamble prefix if needed.
(atom_main_file, maybe_atom_legacy_module): New.
(init_module_processing): Don't default module_header_name here.
(atom_module_preamble, finish_module): Push & pop exporting state in
legacy mode.
* parser.c (cp_parser_get_module_preamble_tokens): Adjust for
preamble state. Return indicator of preamble contents.
(c_parse_file): Maybe inject legacy module decl.
* cp-lang.c (LANG_HOOKS_PREPROCESS_MAIN_FILE): Override hook.
(atom_preamble_fsm): Adjust for state enum.
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/lang-specs.h
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/langhooks-def.h
branches/c++-modules/gcc/langhooks.h
branches/c++-modules/libcpp/line-map.c
More information about the Gcc-cvs
mailing list