aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-objcp-common.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-11 19:09:51 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-11 19:09:51 +0000
commit505dd180fa93c15942be514aa8e9139bb024d5e8 (patch)
tree3aac882b8c9fd00c1a9d4c9f443568c35b01d4b2 /gcc/cp/cp-objcp-common.c
parent430af3cf5a8e5f96ff3ac491a9b37e6b2989fa24 (diff)
downloadgcc-505dd180fa93c15942be514aa8e9139bb024d5e8.zip
gcc-505dd180fa93c15942be514aa8e9139bb024d5e8.tar.gz
gcc-505dd180fa93c15942be514aa8e9139bb024d5e8.tar.bz2
cp-lang.c (get_global_decls, [...]): Move to ...
* cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS) LANG_HOOKS_PUSHDECL): Move to ... * cp-objcp-common.c (cp_get_global_decls, cp_pushdec) LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here. * cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare. ((--This line, and those below, will be ignored-- M cp/ChangeLog M cp/cp-lang.c M cp/cp-objcp-common.c M cp/cp-objcp-common.h From-SVN: r247923
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
-rw-r--r--gcc/cp/cp-objcp-common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index 2c93252..8627978 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -336,6 +336,22 @@ cxx_block_may_fallthru (const_tree stmt)
}
}
+/* Return the list of decls in the global namespace. */
+
+tree
+cp_get_global_decls ()
+{
+ return NAMESPACE_LEVEL (global_namespace)->names;
+}
+
+/* Push DECL into the current scope. */
+
+tree
+cp_pushdecl (tree decl)
+{
+ return pushdecl (decl);
+}
+
void
cp_common_init_ts (void)
{