summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-objcp-common.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-15 10:17:32 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-15 10:17:32 +0000
commit83c7dcd885c2189c91a3b26bb2697ba1027404a8 (patch)
treec2916073d31a98f423ae5a332f347790559245bb /gcc/cp/cp-objcp-common.c
parent8f3f392caa32f21ad2fa9aa95798a02b0e46db4f (diff)
downloadgcc-83c7dcd885c2189c91a3b26bb2697ba1027404a8.tar.gz
* tree.c (tree_code_size): Add TRANSLATION_UNIT_DECL,
NAMESPACE_DECL, IMPORTED_DECL and NAMELIST_DECL; call langhook for unknown declaration. (find_decls_types_r): Do not walk DECL_ARGUMENT_FLD. * tree.h (DECL_ARGUMENTS): Update. * print-tree.c (print_node): Update. * tree-core.h (tree_decl_non_common): Remove arguments. (tree_function_decl): Add arguments. * class.c (build_clone): Do not clear assembler names of templates. * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL. * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL as a special case return sizeof (struct tree_decl_non_common) for other decls. (cp_common_init_ts): Do not initialize NAMESPACE_DECL; initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON. * cp/cp-tree.h (tree_template_decl): New structure. (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL. (union cp_lang_tree_node): Add template_decl. (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update. * lto/lto.c (mentions_vars_p_decl_non_common): Skip DECL_ARGUMENT_FLD. mentions_vars_p_function): Do DECL_ARGUMENTS. (lto_fixup_prevailing_decls): Update. * objc-act.c (objc_common_tree_size): New function. * objc-act.h (KEYWORD_KEY_NAME, KEYWORD_ARG_NAME): Add type checking. (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK): New macro. (METHOD_SEL_NAME, METHOD_SEL_ARGS, METHOD_ADD_ARGS, METHOD_ADD_ARGS_ELLIPSIS_P, METHOD_DEFINITION, METHOD_ENCODING, METHOD_TYPE_ATTRIBUTES, METHOD_PROPERTY_CONTEXT): Add type checking. (METHOD_SEL_ARGS): Use decl_common.size instead of decl_non_common.result. (PROPERTY_NAME, PROPERTY_GETTER_NAME, PROPERTY_SETTER_NAME, PROPERTY_READONLY, PROPERTY_NONATOMIC, PROPERTY_ASSIGN_SEMANTICS, PROPERTY_IVAR_NAME, PROPERTY_DYNAMIC, PROPERTY_HAS_NO_GETTER, PROPERTY_HAS_NO_SETTER, PROPERTY_OPTIONAL): Add type checking. (objc_common_tree_size): Declare. * objc/objc-lang.c (LANG_HOOKS_TREE_SIZE): New macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212549 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
-rw-r--r--gcc/cp/cp-objcp-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index 78dddef70d1..0c50f4085ab 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -103,7 +103,11 @@ cp_tree_size (enum tree_code code)
case USERDEF_LITERAL: return sizeof (struct tree_userdef_literal);
+ case TEMPLATE_DECL: return sizeof (struct tree_template_decl);
+
default:
+ if (TREE_CODE_CLASS (code) == tcc_declaration)
+ return sizeof (struct tree_decl_non_common);
gcc_unreachable ();
}
/* NOTREACHED */
@@ -245,9 +249,8 @@ cxx_block_may_fallthru (const_tree stmt)
void
cp_common_init_ts (void)
{
- MARK_TS_DECL_NON_COMMON (NAMESPACE_DECL);
MARK_TS_DECL_NON_COMMON (USING_DECL);
- MARK_TS_DECL_NON_COMMON (TEMPLATE_DECL);
+ MARK_TS_DECL_COMMON (TEMPLATE_DECL);
MARK_TS_COMMON (TEMPLATE_TEMPLATE_PARM);
MARK_TS_COMMON (TEMPLATE_TYPE_PARM);