aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-runtime-shared-support.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2011-07-11 09:42:23 +0000
committerNicola Pero <nicola@gcc.gnu.org>2011-07-11 09:42:23 +0000
commita8f18c40371add2ef647d14127cf91b046570bec (patch)
tree024ae2d04e639fefc111192785d29753f43e2712 /gcc/objc/objc-runtime-shared-support.c
parent18970372c2159a1ad63e58f1683a01d2bcf3a86f (diff)
downloadgcc-a8f18c40371add2ef647d14127cf91b046570bec.zip
gcc-a8f18c40371add2ef647d14127cf91b046570bec.tar.gz
gcc-a8f18c40371add2ef647d14127cf91b046570bec.tar.bz2
In gcc/objc/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com> * objc-encoding.h (obstack.h): Do not include. (util_obstack, util_firstobj): Do not declare. (encode_field_decl): Updated prototype to return a tree and take a single tree argument. Updated comments. * objc-encoding.c (util_obstack, util_firstobj): Made static. (objc_encoding_init): New. (encode_field_decl): Existing function renamed to encode_field and made static. New encode_field_decl wrapper function added. (encode_aggregate_fields): Update call to encode_field_decl to call encode_field. * objc-next-runtime-abi-02.c (obstack.h): Do not include. (util_obstack, util_firstobj): Do not declare. (build_v2_ivar_list_initializer): Updated call to encode_field_decl. * objc-runtime-shared-support.c (obstack.h): Do not include. (util_obstack, util_firstobj): Do not declare. (build_ivar_list_initializer): Updated call to encode_field_decl. * objc-act.c (objc_init): Use objc_encoding_init. * Make-lang.in (objc/objc-runtime-shared-support.o): Do not depend on OBSTACK_H. (objc/objc-gnu-runtime-abi-01.o): Likewise. (objc/objc-next-runtime-abi-01.o): Likewise. (objc/objc-next-runtime-abi-02.o): Likewise. (objc/objc-act.o): Likewise. In gcc/objcp/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com> * Make-lang.in (objcp/objc-runtime-shared-support.o): Do not depend on OBSTACK_H. (objcp/objc-gnu-runtime-abi-01.o): Likewise. (objcp/objc-next-runtime-abi-01.o): Likewise. (objcp/objc-next-runtime-abi-02.o): Likewise. (objcp/objcp-act.o): Likewise. From-SVN: r176139
Diffstat (limited to 'gcc/objc/objc-runtime-shared-support.c')
-rw-r--r--gcc/objc/objc-runtime-shared-support.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.c
index 913b0fd..7d478d9 100644
--- a/gcc/objc/objc-runtime-shared-support.c
+++ b/gcc/objc/objc-runtime-shared-support.c
@@ -41,12 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "objcp-decl.h"
#endif /* OBJCPLUS */
-#include "obstack.h"
-
-/* These are only used for encoding ivars. */
-extern struct obstack util_obstack;
-extern char *util_firstobj;
-
/* Hooks for string decls etc. */
#include "objc-runtime-hooks.h"
@@ -551,16 +545,9 @@ build_ivar_list_initializer (tree type, tree field_decl)
CONSTRUCTOR_APPEND_ELT (ivar, NULL_TREE, build_int_cst (NULL_TREE, 0));
/* Set type. */
- encode_field_decl (field_decl,
- obstack_object_size (&util_obstack),
- OBJC_ENCODE_DONT_INLINE_DEFS);
-
- /* Null terminate string. */
- obstack_1grow (&util_obstack, 0);
- id = add_objc_string (get_identifier (XOBFINISH (&util_obstack, char *)),
+ id = add_objc_string (encode_field_decl (field_decl),
meth_var_types);
CONSTRUCTOR_APPEND_ELT (ivar, NULL_TREE, id);
- obstack_free (&util_obstack, util_firstobj);
/* Set offset. */
CONSTRUCTOR_APPEND_ELT (ivar, NULL_TREE, byte_position (field_decl));