aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/module.cc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-12-11 06:42:26 -0800
committerNathan Sidwell <nathan@acm.org>2020-12-11 06:44:26 -0800
commit97b56dece74138398977ea53368a025ed231b35c (patch)
tree51154b245c698f740fec5c4306d30371af0c9210 /gcc/cp/module.cc
parent37b242a3fbd29839ce352dfd8444c44989642a42 (diff)
downloadgcc-97b56dece74138398977ea53368a025ed231b35c.zip
gcc-97b56dece74138398977ea53368a025ed231b35c.tar.gz
gcc-97b56dece74138398977ea53368a025ed231b35c.tar.bz2
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.
Diffstat (limited to 'gcc/cp/module.cc')
-rw-r--r--gcc/cp/module.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 11eb6da..02b5af8 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -65,6 +65,9 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h"
#include "langhooks.h"
+/* Id for dumping module information. */
+int module_dump_id;
+
/* What the current TU is. */
unsigned module_kind;
@@ -190,6 +193,11 @@ preprocessed_module (cpp_reader *)
}
void
+module_begin_main_file (cpp_reader *, line_maps *, const line_map_ordinary *)
+{
+}
+
+void
init_modules (cpp_reader *)
{
/* Do not turn on yet. */
@@ -207,3 +215,14 @@ void
fini_modules ()
{
}
+
+bool
+handle_module_option (unsigned, const char *, int)
+{
+ return false;
+}
+
+void
+module_preprocess_options (cpp_reader *)
+{
+}