aboutsummaryrefslogtreecommitdiff
path: root/libiberty/objalloc.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2022-05-09 04:40:43 -0700
committerNathan Sidwell <nathan@acm.org>2022-05-10 04:08:05 -0700
commitd1e8f221e3fc8d3153b662c2f912bf1a26d645ff (patch)
treefe461e95e9e42b16bd7b64c7e757585397ff0b6b /libiberty/objalloc.c
parent76db543db88727789a6c117608a23edc2eace713 (diff)
downloadgcc-d1e8f221e3fc8d3153b662c2f912bf1a26d645ff.zip
gcc-d1e8f221e3fc8d3153b662c2f912bf1a26d645ff.tar.gz
gcc-d1e8f221e3fc8d3153b662c2f912bf1a26d645ff.tar.bz2
[c++] Disambiguate ModuleKind flags
In modules, 'attached to global module' nearly always means 'not in module purview'. Also the implementation treats, 'in global module && in module purview' as meaning 'header unit'. The ModuleKind flags reflected that. The 'nearly always' means there are cases that the first condition is not invariant, and that of course invalidates the second equivalence. This disambiguates the ModuleKind flags to allow that 'not quite', and separate out header-unitness from the GMF & purview flags combination. 1) Separate out named-module vs header-unit from the MODULE/GLOBAL flags. 2) Replace the MODULE/GLOBAL flags with PURVIEW & ATTACH flags. 3) Adjust the parser state handling. Lays ground-work for language-declaration changes. gcc/cp/ * cp-tree.h (enum module_kind_bits): Disambiguate purview, attach, named module vs header-unit. (global_purview_p, not_module_p): Delete. (named_module_p): New. (header_module_p, module_purview_p): Adjust. (module_attach_p, named_module_purview_p): New. * decl.cc (duplicate_decls): Adjust. * module.cc (declare_module, preprocessed_module): Adjust. * name-lookup.cc (init_global_partition): Adjust. (get_fixed_binding_slot, pushdecl): Adjust. * parser.cc (cp_parser_module_declaration): Adjust. (cp_parser_import_declaration, cp_parser_declaration): Adjust.
Diffstat (limited to 'libiberty/objalloc.c')
0 files changed, 0 insertions, 0 deletions