summaryrefslogtreecommitdiffstats
path: root/gcc/c-family
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-06 00:56:06 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-06 00:56:06 +0000
commit6c536c4fff2cea1ebfc94aa36c1a5c50151d0305 (patch)
treef19d72f21c2800be50aed27ab677db5388d44de5 /gcc/c-family
parent8c35d268c774a348c0e041c4e507137dabe98974 (diff)
downloadppe42-gcc-6c536c4fff2cea1ebfc94aa36c1a5c50151d0305.tar.gz
ppe42-gcc-6c536c4fff2cea1ebfc94aa36c1a5c50151d0305.zip
In gcc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * c-family/c-common.h: Removed the declarations of all the objc_ callbacks, and moved them into c-objc.h. Removed objc_ivar_visibility_kind and moved it into c-objc.h. * c-family/c-objc.h: New file. * c-family/c-common.c: Include c-objc.h. * c-family/c-format.c: Same change. * c-family/stub-objc.c: Same change. * c-decl.c: Include c-family/c-objc.h. * c-parser.c: Same change. * c-typeck.c: Same change. * c-config-lang.in (gtfiles): Added c-family/c-objc.h. * Makefile.in (c-decl.o): Depend on c-family/c-objc.h. (c-parser.o): same change. (c-typeck.o): Same change. (c-family/c-format.o): Same change. (c-family/stub-objc.o): Same change. (c-family/c-common.o): Same change. (PLUGIN_HEADERS): Added c-family/c-objc.h. In gcc/cp/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * call.c: Include c-family/c-objc.h. * decl.c: Same change. * decl2.c: Same change. * error.c: Same change. * lex.c: Same change. * parser.c: Same change. * pt.c: Same change. * semantics.c: Same change. * typeck.c: Same change. * Make-lang.in (cp/decl.o): Depend on c-family/c-objc.h. (cp/decl2.o): Same change. (cp/call.o): Same change. (cp/error.o): Same change. (cp/lex.o): Same change. (cp/parser.o): Same change. (cp/pt.o): Same change. (cp/semantics.o): Same change. (cp/typeck.o): Same change. * config-lang.in (gtfiles): Added c-family/c-objc.h. In gcc/objc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c: Include c-family/c-objc.h. * objc-lang.c: Same change. * Make-lang.in (objc/objc-act.o): Depend on c-family/c-objc.h. (objc/objc-lang.o): Same change. * config-lang.in (gtfiles): Added c-family/c-objc.h. In gcc/objcp/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * config-lang.in (gtfiles): Added c-family/c-objc.h. * Make-lang.in (objcp/objcp-act.o): Depend on c-family/c-objc.h. (objcp/objcp-lang.o): Same change. (objcp/objcp-decl.o): Same change. * objcp-lang.c: Include c-family/c-objc.h. * objcp-decl.c: Same change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167481 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/c-common.c1
-rw-r--r--gcc/c-family/c-common.h90
-rw-r--r--gcc/c-family/c-format.c1
-rw-r--r--gcc/c-family/c-objc.h115
-rw-r--r--gcc/c-family/stub-objc.c1
5 files changed, 118 insertions, 90 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 21a6ad43664..7a57838a857 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "c-pragma.h"
#include "ggc.h"
#include "c-common.h"
+#include "c-objc.h"
#include "tm_p.h"
#include "obstack.h"
#include "cpplib.h"
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 7e261e88df3..928e5021d23 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -434,14 +434,6 @@ extern c_language_kind c_language;
#define c_dialect_cxx() ((c_language & clk_cxx) != 0)
#define c_dialect_objc() ((c_language & clk_objc) != 0)
-/* ObjC ivar visibility types. */
-typedef enum objc_ivar_visibility_kind {
- OBJC_IVAR_VIS_PROTECTED = 0,
- OBJC_IVAR_VIS_PUBLIC = 1,
- OBJC_IVAR_VIS_PRIVATE = 2,
- OBJC_IVAR_VIS_PACKAGE = 3
-} objc_ivar_visibility_kind;
-
/* The various name of operator that appears in error messages. */
typedef enum ref_operator {
/* NULL */
@@ -988,88 +980,6 @@ extern void c_stddef_cpp_builtins (void);
extern void fe_file_change (const struct line_map *);
extern void c_parse_error (const char *, enum cpp_ttype, tree, unsigned char);
-/* Objective-C / Objective-C++ entry points. */
-
-/* The following ObjC/ObjC++ functions are called by the C and/or C++
- front-ends; they all must have corresponding stubs in stub-objc.c. */
-extern void objc_write_global_declarations (void);
-extern tree objc_is_class_name (tree);
-extern tree objc_is_object_ptr (tree);
-extern void objc_check_decl (tree);
-extern void objc_check_global_decl (tree);
-extern tree objc_common_type (tree, tree);
-extern bool objc_compare_types (tree, tree, int, tree);
-extern bool objc_have_common_type (tree, tree, int, tree);
-extern bool objc_diagnose_private_ivar (tree);
-extern void objc_volatilize_decl (tree);
-extern tree objc_rewrite_function_call (tree, tree);
-extern tree objc_message_selector (void);
-extern tree objc_lookup_ivar (tree, tree);
-extern void objc_clear_super_receiver (void);
-extern int objc_is_public (tree, tree);
-extern tree objc_is_id (tree);
-extern void objc_declare_alias (tree, tree);
-extern void objc_declare_class (tree);
-extern void objc_declare_protocols (tree, tree);
-extern tree objc_build_message_expr (tree);
-extern tree objc_finish_message_expr (tree, tree, tree);
-extern tree objc_build_selector_expr (location_t, tree);
-extern tree objc_build_protocol_expr (tree);
-extern tree objc_build_encode_expr (tree);
-extern tree objc_build_string_object (tree);
-extern tree objc_get_protocol_qualified_type (tree, tree);
-extern tree objc_get_class_reference (tree);
-extern tree objc_get_class_ivars (tree);
-extern tree objc_get_interface_ivars (tree);
-extern void objc_start_class_interface (tree, tree, tree, tree);
-extern void objc_start_category_interface (tree, tree, tree, tree);
-extern void objc_start_protocol (tree, tree, tree);
-extern void objc_continue_interface (void);
-extern void objc_finish_interface (void);
-extern void objc_start_class_implementation (tree, tree);
-extern void objc_start_category_implementation (tree, tree);
-extern void objc_continue_implementation (void);
-extern void objc_finish_implementation (void);
-extern void objc_set_visibility (objc_ivar_visibility_kind);
-extern tree objc_build_method_signature (bool, tree, tree, tree, bool);
-extern void objc_add_method_declaration (bool, tree, tree);
-extern bool objc_start_method_definition (bool, tree, tree);
-extern void objc_finish_method_definition (tree);
-extern void objc_add_instance_variable (tree);
-extern tree objc_build_keyword_decl (tree, tree, tree, tree);
-extern tree objc_build_throw_stmt (location_t, tree);
-extern void objc_begin_try_stmt (location_t, tree);
-extern tree objc_finish_try_stmt (void);
-extern void objc_begin_catch_clause (tree);
-extern void objc_finish_catch_clause (void);
-extern void objc_build_finally_clause (location_t, tree);
-extern tree objc_build_synchronized (location_t, tree, tree);
-extern int objc_static_init_needed_p (void);
-extern tree objc_generate_static_init_call (tree);
-extern tree objc_generate_write_barrier (tree, enum tree_code, tree);
-extern void objc_set_method_opt (bool);
-extern void objc_finish_foreach_loop (location_t, tree, tree, tree, tree, tree);
-extern bool objc_method_decl (enum tree_code);
-extern void objc_add_property_declaration (location_t, tree, bool, bool, bool,
- bool, bool, bool, tree, tree);
-extern tree objc_maybe_build_component_ref (tree, tree);
-extern tree objc_build_class_component_ref (tree, tree);
-extern tree objc_maybe_build_modify_expr (tree, tree);
-extern tree objc_build_incr_expr_for_property_ref (location_t, enum tree_code,
- tree, tree);
-extern void objc_add_synthesize_declaration (location_t, tree);
-extern void objc_add_dynamic_declaration (location_t, tree);
-extern const char * objc_maybe_printable_name (tree, int);
-extern bool objc_is_property_ref (tree);
-extern bool objc_string_ref_type_p (tree);
-extern void objc_check_format_arg (tree, tree);
-extern void objc_finish_function (void);
-
-/* The following are provided by the C and C++ front-ends, and called by
- ObjC/ObjC++. */
-extern void *objc_get_current_scope (void);
-extern void objc_mark_locals_volatile (void *);
-
/* In c-ppoutput.c */
extern void init_pp_output (FILE *);
extern void preprocess_file (cpp_reader *);
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c
index f5fc9d7ddb1..85831eb568e 100644
--- a/gcc/c-family/c-format.c
+++ b/gcc/c-family/c-format.c
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "flags.h"
#include "c-common.h"
+#include "c-objc.h"
#include "intl.h"
#include "diagnostic-core.h"
#include "langhooks.h"
diff --git a/gcc/c-family/c-objc.h b/gcc/c-family/c-objc.h
new file mode 100644
index 00000000000..4089293eee3
--- /dev/null
+++ b/gcc/c-family/c-objc.h
@@ -0,0 +1,115 @@
+/* Definitions of Objective-C front-end entry points used for C and C++.
+ Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_C_COMMON_OBJC_H
+#define GCC_C_COMMON_OBJC_H
+
+/* ObjC ivar visibility types. */
+typedef enum objc_ivar_visibility_kind {
+ OBJC_IVAR_VIS_PROTECTED = 0,
+ OBJC_IVAR_VIS_PUBLIC = 1,
+ OBJC_IVAR_VIS_PRIVATE = 2,
+ OBJC_IVAR_VIS_PACKAGE = 3
+} objc_ivar_visibility_kind;
+
+/* Objective-C / Objective-C++ entry points. */
+
+/* The following ObjC/ObjC++ functions are called by the C and/or C++
+ front-ends; they all must have corresponding stubs in stub-objc.c. */
+extern void objc_write_global_declarations (void);
+extern tree objc_is_class_name (tree);
+extern tree objc_is_object_ptr (tree);
+extern void objc_check_decl (tree);
+extern void objc_check_global_decl (tree);
+extern tree objc_common_type (tree, tree);
+extern bool objc_compare_types (tree, tree, int, tree);
+extern bool objc_have_common_type (tree, tree, int, tree);
+extern bool objc_diagnose_private_ivar (tree);
+extern void objc_volatilize_decl (tree);
+extern tree objc_rewrite_function_call (tree, tree);
+extern tree objc_message_selector (void);
+extern tree objc_lookup_ivar (tree, tree);
+extern void objc_clear_super_receiver (void);
+extern int objc_is_public (tree, tree);
+extern tree objc_is_id (tree);
+extern void objc_declare_alias (tree, tree);
+extern void objc_declare_class (tree);
+extern void objc_declare_protocols (tree, tree);
+extern tree objc_build_message_expr (tree);
+extern tree objc_finish_message_expr (tree, tree, tree);
+extern tree objc_build_selector_expr (location_t, tree);
+extern tree objc_build_protocol_expr (tree);
+extern tree objc_build_encode_expr (tree);
+extern tree objc_build_string_object (tree);
+extern tree objc_get_protocol_qualified_type (tree, tree);
+extern tree objc_get_class_reference (tree);
+extern tree objc_get_class_ivars (tree);
+extern tree objc_get_interface_ivars (tree);
+extern void objc_start_class_interface (tree, tree, tree, tree);
+extern void objc_start_category_interface (tree, tree, tree, tree);
+extern void objc_start_protocol (tree, tree, tree);
+extern void objc_continue_interface (void);
+extern void objc_finish_interface (void);
+extern void objc_start_class_implementation (tree, tree);
+extern void objc_start_category_implementation (tree, tree);
+extern void objc_continue_implementation (void);
+extern void objc_finish_implementation (void);
+extern void objc_set_visibility (objc_ivar_visibility_kind);
+extern tree objc_build_method_signature (bool, tree, tree, tree, bool);
+extern void objc_add_method_declaration (bool, tree, tree);
+extern bool objc_start_method_definition (bool, tree, tree);
+extern void objc_finish_method_definition (tree);
+extern void objc_add_instance_variable (tree);
+extern tree objc_build_keyword_decl (tree, tree, tree, tree);
+extern tree objc_build_throw_stmt (location_t, tree);
+extern void objc_begin_try_stmt (location_t, tree);
+extern tree objc_finish_try_stmt (void);
+extern void objc_begin_catch_clause (tree);
+extern void objc_finish_catch_clause (void);
+extern void objc_build_finally_clause (location_t, tree);
+extern tree objc_build_synchronized (location_t, tree, tree);
+extern int objc_static_init_needed_p (void);
+extern tree objc_generate_static_init_call (tree);
+extern tree objc_generate_write_barrier (tree, enum tree_code, tree);
+extern void objc_set_method_opt (bool);
+extern void objc_finish_foreach_loop (location_t, tree, tree, tree, tree, tree);
+extern bool objc_method_decl (enum tree_code);
+extern void objc_add_property_declaration (location_t, tree, bool, bool, bool,
+ bool, bool, bool, tree, tree);
+extern tree objc_maybe_build_component_ref (tree, tree);
+extern tree objc_build_class_component_ref (tree, tree);
+extern tree objc_maybe_build_modify_expr (tree, tree);
+extern tree objc_build_incr_expr_for_property_ref (location_t, enum tree_code,
+ tree, tree);
+extern void objc_add_synthesize_declaration (location_t, tree);
+extern void objc_add_dynamic_declaration (location_t, tree);
+extern const char * objc_maybe_printable_name (tree, int);
+extern bool objc_is_property_ref (tree);
+extern bool objc_string_ref_type_p (tree);
+extern void objc_check_format_arg (tree, tree);
+extern void objc_finish_function (void);
+
+/* The following are provided by the C and C++ front-ends, and called by
+ ObjC/ObjC++. */
+extern void *objc_get_current_scope (void);
+extern void objc_mark_locals_volatile (void *);
+
+#endif /* ! GCC_C_COMMON_OBJC_H */
diff --git a/gcc/c-family/stub-objc.c b/gcc/c-family/stub-objc.c
index fbf7ece1e97..0600c2fb7dd 100644
--- a/gcc/c-family/stub-objc.c
+++ b/gcc/c-family/stub-objc.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tree.h"
#include "c-common.h"
+#include "c-objc.h"
tree
objc_is_class_name (tree ARG_UNUSED (arg))
OpenPOWER on IntegriCloud