aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-12-11 11:10:40 -0800
committerNathan Sidwell <nathan@acm.org>2020-12-11 11:15:30 -0800
commit262784be3dcf91a712502b1f4f73e72155171f20 (patch)
tree14271ae9e3e5bc5af0dc299565c458b7627cd6d9 /gcc/gcc.c
parent02fc65c7263c75d222758d6c652b83e543872edf (diff)
downloadgcc-262784be3dcf91a712502b1f4f73e72155171f20.zip
gcc-262784be3dcf91a712502b1f4f73e72155171f20.tar.gz
gcc-262784be3dcf91a712502b1f4f73e72155171f20.tar.bz2
c++: Final module preparations
This adds the final few preparations to drop modules in. I'd missed a couple of changes to core compiler -- a new pair of preprocessor options, and marking the boundary of fixed and lazy global trees. For C++, we need to add module.cc to the GTY scanner. Parsing final cleanups needs a few tweaks for modules. Lambdas used to initialize a global (for instance) get an extra scope, but we now need to point that object to the lambda too. Finally template instantiation needs to do lazy loading before looking at the available instantiations and specializations. gcc/ * gcc.c (cpp_unique_options): Add Mmodules, Mno-modules. * tree-core.h (enum tree_index): Add TI_MODULE_HWM. gcc/cp/ * config-lang.in (gtfiles): Add cp/module.cc. * decl2.c (c_parse_final_cleanups): Add module support. * lambda.c (record_lambda_scope): Call maybe_attach_decl. * module.cc (maybe_attach_decl, lazy_load_specializations): Stubs. (finish_module_procesing): Stub. * pt.c (lookup_template_class_1): Lazy load specializations. (instantiate_template_1): Likewise.
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 1d32375..d179de7 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1232,6 +1232,7 @@ static const char *cpp_unique_options =
%{MD:-MD %{!o:%b.d}%{o*:%.d%*}}\
%{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\
%{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
+ %{Mmodules} %{Mno-modules}\
%{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}}\
%{remap} %{%:debug-level-gt(2):-dD}\
%{!iplugindir*:%{fplugin*:%:find-plugindir()}}\