aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c18
-rw-r--r--gcc/objc/objc-act.h1
-rw-r--r--gcc/objc/objc-lang.c32
4 files changed, 26 insertions, 31 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 110de87..caceac1 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
+
+ * objc-lang.c (objc_init_ts): Move code for this function...
+ * objc-act.c (objc_common_init_ts): ...here. Define.
+ * objc-act.h (objc_common_init_ts): Declare.
+
2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_message_expr): Accept two arguments
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 2f6613c..13eef24 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -10640,4 +10640,22 @@ objc_v2_encode_prop_attr (tree property)
return get_identifier (string);
}
+void
+objc_common_init_ts (void)
+{
+ c_common_init_ts ();
+
+ MARK_TS_DECL_NON_COMMON (CLASS_METHOD_DECL);
+ MARK_TS_DECL_NON_COMMON (INSTANCE_METHOD_DECL);
+ MARK_TS_DECL_NON_COMMON (KEYWORD_DECL);
+ MARK_TS_DECL_NON_COMMON (PROPERTY_DECL);
+
+ MARK_TS_COMMON (CLASS_INTERFACE_TYPE);
+ MARK_TS_COMMON (PROTOCOL_INTERFACE_TYPE);
+ MARK_TS_COMMON (CLASS_IMPLEMENTATION_TYPE);
+
+ MARK_TS_TYPED (MESSAGE_SEND_EXPR);
+ MARK_TS_TYPED (PROPERTY_REF);
+}
+
#include "gt-objc-objc-act.h"
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index 3983d4b..909181a 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -28,6 +28,7 @@ bool objc_init (void);
const char *objc_printable_name (tree, int);
tree objc_fold_obj_type_ref (tree, tree);
int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
+void objc_common_init_ts (void);
/* NB: The remaining public functions are prototyped in c-common.h, for the
benefit of stub-objc.c and objc-act.c. */
diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.c
index fd657765..169b894 100644
--- a/gcc/objc/objc-lang.c
+++ b/gcc/objc/objc-lang.c
@@ -36,7 +36,6 @@ along with GCC; see the file COPYING3. If not see
#include "c-lang.h"
enum c_language_kind c_language = clk_objc;
-static void objc_init_ts (void);
/* Lang hooks common to C and ObjC are declared in c-objc-common.h;
consequently, there should be very few hooks below. */
@@ -50,7 +49,7 @@ static void objc_init_ts (void);
#undef LANG_HOOKS_GIMPLIFY_EXPR
#define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr
#undef LANG_HOOKS_INIT_TS
-#define LANG_HOOKS_INIT_TS objc_init_ts
+#define LANG_HOOKS_INIT_TS objc_common_init_ts
/* Each front end provides its own lang hook initializer. */
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
@@ -58,33 +57,4 @@ struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
/* Lang hook routines common to C and ObjC appear in c-objc-common.c;
there should be very few (if any) routines below. */
-static void
-objc_init_ts (void)
-{
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_NON_COMMON] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_WITH_VIS] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_WRTL] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_MINIMAL] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_COMMON] = 1;
-}
-
#include "gtype-objc.h"