aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-07-15 14:31:28 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-07-15 14:31:28 +0000
commit910ad8dee56faaae9c25a6d026a39574937f6329 (patch)
tree44ed3312376cfb15e4d1e4daef8778e326affa24 /gcc/objc
parentb05027be0c8c7ff62ae4372487161b3c6ce46947 (diff)
downloadgcc-910ad8dee56faaae9c25a6d026a39574937f6329.zip
gcc-910ad8dee56faaae9c25a6d026a39574937f6329.tar.gz
gcc-910ad8dee56faaae9c25a6d026a39574937f6329.tar.bz2
tree.h (DECL_CHAIN): Define.
gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog4
-rw-r--r--gcc/objc/objc-act.c74
2 files changed, 41 insertions, 37 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 17b116f..de6cbeb 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
+
+ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
+
2010-07-10 Iain Sandoe <iains@gcc.gnu.org>
PR objc/44140
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index a0f3690..81aba84 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -455,7 +455,7 @@ add_field_decl (tree type, const char *name, tree **chain)
if (*chain != NULL)
**chain = field;
- *chain = &TREE_CHAIN (field);
+ *chain = &DECL_CHAIN (field);
return field;
}
@@ -851,9 +851,9 @@ objc_build_struct (tree klass, tree fields, tree super_name)
FIELD_DECL, NULL_TREE, super);
tree field = TYPE_FIELDS (super);
- while (field && TREE_CHAIN (field)
- && TREE_CODE (TREE_CHAIN (field)) == FIELD_DECL)
- field = TREE_CHAIN (field);
+ while (field && DECL_CHAIN (field)
+ && TREE_CODE (DECL_CHAIN (field)) == FIELD_DECL)
+ field = DECL_CHAIN (field);
/* For ObjC ABI purposes, the "packed" size of a base class is
the sum of the offset and the size (in bits) of the last field
@@ -882,7 +882,7 @@ objc_build_struct (tree klass, tree fields, tree super_name)
if (fields)
TREE_NO_WARNING (fields) = 1; /* Suppress C++ ABI warnings -- we */
#endif /* are following the ObjC ABI here. */
- TREE_CHAIN (base) = fields;
+ DECL_CHAIN (base) = fields;
fields = base;
}
@@ -1848,11 +1848,11 @@ check_string_class_template (void)
if (!AT_LEAST_AS_LARGE_AS (field_decl, ptr_type_node))
return 0;
- field_decl = TREE_CHAIN (field_decl);
+ field_decl = DECL_CHAIN (field_decl);
if (!AT_LEAST_AS_LARGE_AS (field_decl, ptr_type_node))
return 0;
- field_decl = TREE_CHAIN (field_decl);
+ field_decl = DECL_CHAIN (field_decl);
return AT_LEAST_AS_LARGE_AS (field_decl, unsigned_type_node);
#undef AT_LEAST_AS_LARGE_AS
@@ -1873,10 +1873,10 @@ objc_build_internal_const_str_type (void)
tree field = build_decl (input_location,
FIELD_DECL, NULL_TREE, ptr_type_node);
- TREE_CHAIN (field) = fields; fields = field;
+ DECL_CHAIN (field) = fields; fields = field;
field = build_decl (input_location,
FIELD_DECL, NULL_TREE, unsigned_type_node);
- TREE_CHAIN (field) = fields; fields = field;
+ DECL_CHAIN (field) = fields; fields = field;
/* NB: The finish_builtin_struct() routine expects FIELD_DECLs in
reverse order! */
finish_builtin_struct (type, "__builtin_ObjCString",
@@ -2003,11 +2003,11 @@ objc_build_string_object (tree string)
? build_unary_op (input_location,
ADDR_EXPR, string_class_decl, 0)
: build_int_cst (NULL_TREE, 0));
- fields = TREE_CHAIN (fields);
+ fields = DECL_CHAIN (fields);
CONSTRUCTOR_APPEND_ELT (v, fields,
build_unary_op (input_location,
ADDR_EXPR, string, 1));
- fields = TREE_CHAIN (fields);
+ fields = DECL_CHAIN (fields);
CONSTRUCTOR_APPEND_ELT (v, fields, build_int_cst (NULL_TREE, length));
constructor = objc_build_constructor (internal_const_str_type, v);
@@ -2231,7 +2231,7 @@ init_objc_symtab (tree type)
{
tree field = TYPE_FIELDS (type);
- field = TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (field))));
+ field = DECL_CHAIN (DECL_CHAIN (DECL_CHAIN (DECL_CHAIN (field))));
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, init_def_list (TREE_TYPE (field)));
}
@@ -4253,7 +4253,7 @@ build_descriptor_table_initializer (tree type, tree entries)
CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE,
objc_build_constructor (type, elts));
- entries = TREE_CHAIN (entries);
+ entries = DECL_CHAIN (entries);
}
while (entries);
@@ -4356,7 +4356,7 @@ encode_method_prototype (tree method_decl)
i = int_size_in_bytes (ptr_type_node);
parm_offset = 2 * i;
for (parms = METHOD_SEL_ARGS (method_decl); parms;
- parms = TREE_CHAIN (parms))
+ parms = DECL_CHAIN (parms))
{
tree type = objc_method_parm_type (parms);
int sz = objc_encoded_type_size (type);
@@ -4379,7 +4379,7 @@ encode_method_prototype (tree method_decl)
/* Argument types. */
parm_offset = 2 * i;
for (parms = METHOD_SEL_ARGS (method_decl); parms;
- parms = TREE_CHAIN (parms))
+ parms = DECL_CHAIN (parms))
{
tree type = objc_method_parm_type (parms);
@@ -4695,7 +4695,7 @@ generate_protocols (void)
encoding = encode_method_prototype (nst_methods);
METHOD_ENCODING (nst_methods) = encoding;
}
- nst_methods = TREE_CHAIN (nst_methods);
+ nst_methods = DECL_CHAIN (nst_methods);
}
while (cls_methods)
@@ -4706,7 +4706,7 @@ generate_protocols (void)
METHOD_ENCODING (cls_methods) = encoding;
}
- cls_methods = TREE_CHAIN (cls_methods);
+ cls_methods = DECL_CHAIN (cls_methods);
}
generate_method_descriptors (p);
@@ -5016,8 +5016,8 @@ check_ivars (tree inter, tree imp)
intdecls);
}
- intdecls = TREE_CHAIN (intdecls);
- impdecls = TREE_CHAIN (impdecls);
+ intdecls = DECL_CHAIN (intdecls);
+ impdecls = DECL_CHAIN (impdecls);
}
}
@@ -5165,7 +5165,7 @@ build_ivar_list_initializer (tree type, tree field_decl)
CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE,
objc_build_constructor (type, ivar));
do
- field_decl = TREE_CHAIN (field_decl);
+ field_decl = DECL_CHAIN (field_decl);
while (field_decl && TREE_CODE (field_decl) != FIELD_DECL);
}
while (field_decl);
@@ -5198,7 +5198,7 @@ ivar_list_length (tree t)
{
int count = 0;
- for (; t; t = TREE_CHAIN (t))
+ for (; t; t = DECL_CHAIN (t))
if (TREE_CODE (t) == FIELD_DECL)
++count;
@@ -5281,7 +5281,7 @@ build_dispatch_table_initializer (tree type, tree entries)
CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE,
objc_build_constructor (type, elems));
- entries = TREE_CHAIN (entries);
+ entries = DECL_CHAIN (entries);
}
while (entries);
@@ -5350,14 +5350,14 @@ mark_referenced_methods (void)
while (chain)
{
cgraph_mark_needed_node (cgraph_node (METHOD_DEFINITION (chain)));
- chain = TREE_CHAIN (chain);
+ chain = DECL_CHAIN (chain);
}
chain = CLASS_NST_METHODS (impent->imp_context);
while (chain)
{
cgraph_mark_needed_node (cgraph_node (METHOD_DEFINITION (chain)));
- chain = TREE_CHAIN (chain);
+ chain = DECL_CHAIN (chain);
}
}
}
@@ -5990,7 +5990,7 @@ get_arg_type_list (tree meth, int context, int superflag)
return arglist;
/* Build a list of argument types. */
- for (akey = METHOD_SEL_ARGS (meth); akey; akey = TREE_CHAIN (akey))
+ for (akey = METHOD_SEL_ARGS (meth); akey; akey = DECL_CHAIN (akey))
{
tree arg_type = TREE_VALUE (TREE_TYPE (akey));
@@ -6822,7 +6822,7 @@ lookup_method (tree mchain, tree method)
if (METHOD_SEL_NAME (mchain) == key)
return mchain;
- mchain = TREE_CHAIN (mchain);
+ mchain = DECL_CHAIN (mchain);
}
return NULL_TREE;
}
@@ -6934,12 +6934,12 @@ objc_add_method (tree klass, tree method, int is_class)
/* put method on list in reverse order */
if (is_class)
{
- TREE_CHAIN (method) = CLASS_CLS_METHODS (klass);
+ DECL_CHAIN (method) = CLASS_CLS_METHODS (klass);
CLASS_CLS_METHODS (klass) = method;
}
else
{
- TREE_CHAIN (method) = CLASS_NST_METHODS (klass);
+ DECL_CHAIN (method) = CLASS_NST_METHODS (klass);
CLASS_NST_METHODS (klass) = method;
}
}
@@ -7151,7 +7151,7 @@ add_instance_variable (tree klass, int visibility, tree field_decl)
static tree
is_ivar (tree decl_chain, tree ident)
{
- for ( ; decl_chain; decl_chain = TREE_CHAIN (decl_chain))
+ for ( ; decl_chain; decl_chain = DECL_CHAIN (decl_chain))
if (DECL_NAME (decl_chain) == ident)
return decl_chain;
return NULL_TREE;
@@ -7278,7 +7278,7 @@ check_methods (tree chain, tree list, int mtype)
mtype, METHOD_SEL_NAME (chain));
}
- chain = TREE_CHAIN (chain);
+ chain = DECL_CHAIN (chain);
}
return first;
@@ -7952,7 +7952,7 @@ encode_aggregate_fields (tree type, int pointed_to, int curtype, int format)
{
tree field = TYPE_FIELDS (type);
- for (; field; field = TREE_CHAIN (field))
+ for (; field; field = DECL_CHAIN (field))
{
#ifdef OBJCPLUS
/* C++ static members, and things that are not field at all,
@@ -8301,9 +8301,9 @@ objc_get_parm_info (int have_ellipsis)
declare_parm_level ();
while (parm_info)
{
- tree next = TREE_CHAIN (parm_info);
+ tree next = DECL_CHAIN (parm_info);
- TREE_CHAIN (parm_info) = NULL_TREE;
+ DECL_CHAIN (parm_info) = NULL_TREE;
parm_info = pushdecl (parm_info);
finish_decl (parm_info, input_location, NULL_TREE, NULL_TREE, NULL_TREE);
parm_info = next;
@@ -8381,7 +8381,7 @@ start_method_def (tree method)
parm = build_decl (input_location,
PARM_DECL, KEYWORD_ARG_NAME (parmlist), type);
objc_push_parm (parm);
- parmlist = TREE_CHAIN (parmlist);
+ parmlist = DECL_CHAIN (parmlist);
}
if (METHOD_ADD_ARGS (method))
@@ -8614,8 +8614,8 @@ really_start_method (tree method,
/* Suppress unused warnings. */
TREE_USED (self_decl) = 1;
DECL_READ_P (self_decl) = 1;
- TREE_USED (TREE_CHAIN (self_decl)) = 1;
- DECL_READ_P (TREE_CHAIN (self_decl)) = 1;
+ TREE_USED (DECL_CHAIN (self_decl)) = 1;
+ DECL_READ_P (DECL_CHAIN (self_decl)) = 1;
#ifdef OBJCPLUS
pop_lang_context ();
#endif
@@ -8973,7 +8973,7 @@ gen_method_decl (tree method)
strcat (errbuf, ")");
strcat (errbuf, IDENTIFIER_POINTER (KEYWORD_ARG_NAME (chain)));
- if ((chain = TREE_CHAIN (chain)))
+ if ((chain = DECL_CHAIN (chain)))
strcat (errbuf, " ");
}
while (chain);