summaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-25 18:52:47 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-25 18:52:47 +0000
commit44e00a7a1b398940c31b260b27a5f1f93d8017ed (patch)
tree46ae0e24e642ec27a2a21ca827419c7f58cb282a /libcc1
parent63dbcd13e93578e21e0717d4990c1701d6957e3e (diff)
Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS.
gcc/cp/ Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS. * cp-tree.h (lang_decl_ns): Remove ns_users field. (DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS): Delete. (TREE_INDIRECT_USING): Delete. * name-lookup.h (is_associated_namespace): Delete. * name-lookup.c (name_lookup::search_usings name_lookup::do_queue_usings): Usings are always direct. (is_associated_namespace): Delete. (handle_namespace_attrs): Use DECL_NAMESPACE_INLINE_P. (namespace_ancestor_1, namespace_ancestor): Delete. (push_using_directive_1, push_using_directive): Delete. (add_using_namespace_1): Delete. (add_using_namespace): Reimplement. (emit_debug_info_using_namespace): New. (finish_namespace_using_directive, finish_local_using_directive push_namespace): Adjust. * tree.c (cp_free_lang_data): Remove DECL_NAMESPACE_USERS handling. libcc1/ * libcp1plugin.cc (plugin_make_namespace_inline): Check and set DECL_NAMESPACE_INLINE_P. gcc/testsuite/ * g++.dg/lookup/using56.C: New. * g++.dg/lookup/using57.C: New. * g++.dg/lookup/using58.C: New. * g++.dg/lookup/using59.C: New. From-SVN: r248467
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/ChangeLog5
-rw-r--r--libcc1/libcp1plugin.cc14
2 files changed, 7 insertions, 12 deletions
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index 1969873a1fd..f22ea27c9c3 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-25 Nathan Sidwell <nathan@acm.org>
+
+ * libcp1plugin.cc (plugin_make_namespace_inline): Check and set
+ DECL_NAMESPACE_INLINE_P.
+
2017-05-23 Nathan Sidwell <nathan@acm.org>
* libcp1plugin.cc (plugin_add_using_decl): Call
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
index 7db74c737a0..43781adce54 100644
--- a/libcc1/libcp1plugin.cc
+++ b/libcc1/libcp1plugin.cc
@@ -930,20 +930,10 @@ plugin_make_namespace_inline (cc1_plugin::connection *)
tree parent_ns = CP_DECL_CONTEXT (inline_ns);
- if (purpose_member (DECL_NAMESPACE_ASSOCIATIONS (inline_ns),
- parent_ns))
+ if (DECL_NAMESPACE_INLINE_P (inline_ns))
return 0;
- pop_namespace ();
-
- gcc_assert (current_namespace == parent_ns);
-
- DECL_NAMESPACE_ASSOCIATIONS (inline_ns)
- = tree_cons (parent_ns, 0,
- DECL_NAMESPACE_ASSOCIATIONS (inline_ns));
- do_using_directive (inline_ns);
-
- push_namespace (DECL_NAME (inline_ns));
+ DECL_NAMESPACE_INLINE_P (inline_ns) = true;
return 1;
}