aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constraint.cc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2022-05-09 04:47:14 -0700
committerNathan Sidwell <nathan@acm.org>2022-05-11 06:38:19 -0700
commita92ed39c416b2a92f404d9851fdfea5cae7e6b21 (patch)
tree937940a8cb1ba7ff82afc2385926cdc4519874c9 /gcc/cp/constraint.cc
parent37a8220fa9188470c677abfef50c1b120c0b6c76 (diff)
downloadgcc-a92ed39c416b2a92f404d9851fdfea5cae7e6b21.zip
gcc-a92ed39c416b2a92f404d9851fdfea5cae7e6b21.tar.gz
gcc-a92ed39c416b2a92f404d9851fdfea5cae7e6b21.tar.bz2
[c++] Add module attachment
This adds module attachment as a distinct flag to 'in module purview'. A declaration may have neither or both (as before), but can also have just the 'in [named-module] purview', which was previously not representable. This new state allows some cleanup of redeclarations (particularly the builtins), which was a little warty. Some other internal APIs get similarly clarified. gcc/cp/ * cp-tree.h (DECL_MODULE_ATTACH_P): New. (struct lang_decl_base): Add module_attach_p flag. * decl.cc (duplicate_decls): Rework module redeclaration checking. * module.cc (trees_out::lang_decl_bools): Write attach flag. (trees_in::lang_decl_bools): ... and read it back. (trees_out::decl_value): Rework module attachment handling. (trees_in::decl_value): Rename local var to reflect meaning. (trees_in::key_mergeable): Likewise. (get_originating_module): Use DECL_MODULE_ATTACH_P. No need to special-case mangling. (module_may_redeclare): Reimplement. (set_originating_module): Deal with attachment. * name-lookup.cc (maybe_record_mergeable_decl): Deal with attachment. (mergeable_namespace_slots): Likewise. (do_nonmember_using_decl): Likewise. * name-lookup.h (mergeable_namespace_slots): Adjust parm meaning. * ptree.cc (cxx_print_decl): Adjust purview & attach printing.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions