c++: Module lang hook overriding
authorNathan Sidwell <nathan@acm.org>
Fri, 11 Dec 2020 14:42:26 +0000 (06:42 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 11 Dec 2020 14:44:26 +0000 (06:44 -0800)
commit97b56dece74138398977ea53368a025ed231b35c
tree51154b245c698f740fec5c4306d30371af0c9210
parent37b242a3fbd29839ce352dfd8444c44989642a42
c++: Module lang hook overriding

This installs stub lang hooks for modules and creates the module dump file.

gcc/cp/
* cp-lang.c (LANG_HOOKS_PREPROCESS_MAIN_FILE): Override.
(LANG_HOOKS_PREPROCESS_OPTIONS): Override.
(LANG_HOOKS_PREPROCESS_TOKEN): Override.
* cp-objcp-common.c (cp_register_dumps): Add module dump.
(cp_handle_option): New.
* cp-objcp-common.h (cp_handle_option): Declare.
(LANG_HOOKS_HANDLE_OPTION): Override.
* cp-tree.h (module_dump_id): Declare.
* module.cc (module_dump_id): Define.
(module_begin_main_file, handle_module_option)
(module_preproces_options): Stubs.
gcc/cp/cp-lang.c
gcc/cp/cp-objcp-common.c
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/module.cc