diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-02-26 07:51:13 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-03-03 04:23:08 -0800 |
commit | 8c4f0c0ceb346e7deb69a44688faab6103aa57da (patch) | |
tree | 4db3f0b423cdf15b7626c31a68bfff30d1ddc10a /libgcc/libgcov-driver.c | |
parent | a7267237371cc978fa6e0485446af11c60e4b102 (diff) | |
download | gcc-8c4f0c0ceb346e7deb69a44688faab6103aa57da.zip gcc-8c4f0c0ceb346e7deb69a44688faab6103aa57da.tar.gz gcc-8c4f0c0ceb346e7deb69a44688faab6103aa57da.tar.bz2 |
c++: namespace reachability [PR 99344]
This reworks namespace serializing to avoid some issues I ran into
when working on 99170. In modules, (non-anonymous) namespaces are
strange beasts, that always have external linkage, but may have
module-specific visibility. I still don't get the latter 100%
correct, but this is in the right direction.
PR c++/99344
gcc/cp/
* module.cc (trees_out::decl_node): Small refactor.
(depset::hash::add_binding_entity): Return true on meeting an
import. Set namespace's import here.
(module_state:write_namespaces): Inform of purview too.
(module_state:read_namespaces): Adjust.
* name-lookup.c (implicitly_export_namespace): Delete.
(do_pushdecl): Don't call it.
(push_namespace): Likewise, set purview.
(add_imported_namespace): Reorder parms.
* name-lookup.h (add_imported_namespace): Alter param ordering.
gcc/testsuite/
* g++.dg/modules/namespace-2_a.C
* g++.dg/modules/pr99344_a.C
* g++.dg/modules/pr99344_b.C
Diffstat (limited to 'libgcc/libgcov-driver.c')
0 files changed, 0 insertions, 0 deletions