]> gcc.gnu.org Git - gcc.git/commitdiff
c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not define.
authorRichard Guenther <rguenther@suse.de>
Thu, 20 Aug 2009 16:11:37 +0000 (16:11 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 20 Aug 2009 16:11:37 +0000 (16:11 +0000)
2009-08-20  Richard Guenther  <rguenther@suse.de>

* c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not
define.
* c-tree.h (c_dup_lang_specific_decl): Remove.
(struct lang_decl, struct lang_type): Move definitions ...
* c-lang.h: ... here.  New file.
* c-decl.c: Include c-lang.h.
(c_dup_lang_specific_decl): Remove.
* c-typeck.c: Include c-lang.h.
* Makefile.in (c-decl.o): Add c-lang.h dependency.
(c-typeck.o): Likewise.
* c-config-lang.in (gtfiles): Add c-lang.h.
* gengtype.c (get_output_file_with_visibility): Handle c-lang.h
like c-tree.h.

objc/
* objc-act.c: Include c-lang.h
* Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.

From-SVN: r150966

12 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/c-config-lang.in
gcc/c-decl.c
gcc/c-lang.h [new file with mode: 0644]
gcc/c-objc-common.h
gcc/c-tree.h
gcc/c-typeck.c
gcc/gengtype.c
gcc/objc/ChangeLog
gcc/objc/Make-lang.in
gcc/objc/objc-act.c

index f9dce7033d124fc5d7e665ec93f43874234ea140..e5b01aadd8a6b3661c94ed6ae5ac8e059171240b 100644 (file)
@@ -1,3 +1,19 @@
+2009-08-20  Richard Guenther  <rguenther@suse.de>
+
+       * c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not
+       define.
+       * c-tree.h (c_dup_lang_specific_decl): Remove.
+       (struct lang_decl, struct lang_type): Move definitions ...
+       * c-lang.h: ... here.  New file.
+       * c-decl.c: Include c-lang.h.
+       (c_dup_lang_specific_decl): Remove.
+       * c-typeck.c: Include c-lang.h.
+       * Makefile.in (c-decl.o): Add c-lang.h dependency.
+       (c-typeck.o): Likewise.
+       * c-config-lang.in (gtfiles): Add c-lang.h.
+       * gengtype.c (get_output_file_with_visibility): Handle c-lang.h
+       like c-tree.h.
+
 2009-08-20  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/alpha/alpha.c (alpha_end_function): Do not clear
index 3ab17715c24f59f07a626be8e609b1d9dfe78bd0..9e8325464a4733b20715ffdb9c51048330c8e0b4 100644 (file)
@@ -1925,11 +1925,11 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
     opts.h $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) $(HASHTAB_H) libfuncs.h \
     $(EXCEPT_H) $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \
     $(DIAGNOSTIC_H) $(INPUT_H) langhooks.h $(GIMPLE_H) tree-mudflap.h  \
-    pointer-set.h $(BASIC_BLOCK_H) $(GIMPLE_H) tree-iterator.h
+    pointer-set.h $(BASIC_BLOCK_H) $(GIMPLE_H) tree-iterator.h c-lang.h
 c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
     $(RTL_H) $(TOPLEV_H) $(TM_P_H) langhooks.h $(GGC_H) $(TREE_FLOW_H) \
-    $(GIMPLE_H) tree-iterator.h
+    $(GIMPLE_H) tree-iterator.h c-lang.h
 c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
     $(C_TREE_H) $(DIAGNOSTIC_H) \
     $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-c.h \
index f53f50900674e12bfa27b5da855bbbc7a088055a..d3cd6f9efeab387916cafc2472aaf41cb7259960 100644 (file)
@@ -22,4 +22,4 @@
 # files used by C that have garbage collection GTY macros in them
 # which therefore need to be scanned by gengtype.c.
 
-gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.h \$(srcdir)/c-pragma.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-parser.c"
+gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.h \$(srcdir)/c-pragma.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-parser.c \$(srcdir)/c-lang.h"
index b594767d04c48835f7570efc48d1c4f390c49f66..9940f928ae8e1d05a5758819a31872c1da476fcc 100644 (file)
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "timevar.h"
 #include "c-common.h"
 #include "c-pragma.h"
+#include "c-lang.h"
 #include "langhooks.h"
 #include "tree-mudflap.h"
 #include "gimple.h"
@@ -8136,21 +8137,6 @@ c_pop_function_context (void)
   warn_about_return_type = p->warn_about_return_type;
 }
 
-/* Copy the DECL_LANG_SPECIFIC data associated with DECL.  */
-
-void
-c_dup_lang_specific_decl (tree decl)
-{
-  struct lang_decl *ld;
-
-  if (!DECL_LANG_SPECIFIC (decl))
-    return;
-
-  ld = GGC_NEW (struct lang_decl);
-  memcpy (ld, DECL_LANG_SPECIFIC (decl), sizeof (struct lang_decl));
-  DECL_LANG_SPECIFIC (decl) = ld;
-}
-
 /* The functions below are required for functionality of doing
    function at once processing in the C front end. Currently these
    functions are not called from anywhere in the C front end, but as
diff --git a/gcc/c-lang.h b/gcc/c-lang.h
new file mode 100644 (file)
index 0000000..beed507
--- /dev/null
@@ -0,0 +1,60 @@
+/* Definitions for C language specific types.
+   Copyright (C) 2009
+   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_LANG_H
+#define GCC_C_LANG_H
+
+#include "c-common.h"
+#include "ggc.h"
+
+struct GTY(()) lang_type {
+  /* In a RECORD_TYPE, a sorted array of the fields of the type.  */
+  struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
+  /* In an ENUMERAL_TYPE, the min and max values.  */
+  tree enum_min;
+  tree enum_max;
+  /* In a RECORD_TYPE, information specific to Objective-C, such
+     as a list of adopted protocols or a pointer to a corresponding
+     @interface.  See objc/objc-act.h for details.  */
+  tree objc_info;
+};
+
+struct GTY(()) lang_decl {
+  char dummy;
+};
+
+/* Save and restore the variables in this file and elsewhere
+   that keep track of the progress of compilation of the current function.
+   Used for nested functions.  */
+
+struct GTY(()) language_function {
+  struct c_language_function base;
+  tree x_break_label;
+  tree x_cont_label;
+  struct c_switch * GTY((skip)) x_switch_stack;
+  struct c_arg_info * GTY((skip)) arg_info;
+  int returns_value;
+  int returns_null;
+  int returns_abnormally;
+  int warn_about_return_type;
+};
+
+
+#endif /* ! GCC_C_LANG_H */
index aaff1c9e3906dd5b01417508f6de9627e27892be..e90236e96c84c004a242d71dd79d622374325dd0 100644 (file)
@@ -54,8 +54,6 @@ along with GCC; see the file COPYING3.  If not see
 #define LANG_HOOKS_TYPES_COMPATIBLE_P c_types_compatible_p
 #undef LANG_HOOKS_MISSING_NORETURN_OK_P
 #define LANG_HOOKS_MISSING_NORETURN_OK_P c_missing_noreturn_ok_p
-#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
-#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
 #undef  LANG_HOOKS_BUILTIN_FUNCTION
 #define LANG_HOOKS_BUILTIN_FUNCTION c_builtin_function
 #undef  LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE
index c01cc664fe88aa0c358e7baae50c4a75853d02b6..502e6efd1520d80a72e19adf2ec7f6fa36b4a693 100644 (file)
@@ -31,12 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #define C_SIZEOF_STRUCT_LANG_IDENTIFIER \
   (sizeof (struct c_common_identifier) + 3 * sizeof (void *))
 
-/* Language-specific declaration information.  */
-
-struct GTY(()) lang_decl {
-  char dummy;
-};
-
 /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only.  */
 #define C_TYPE_FIELDS_READONLY(TYPE) TREE_LANG_FLAG_1 (TYPE)
 
@@ -56,18 +50,6 @@ struct GTY(()) lang_decl {
    and C_RID_YYCODE is the token number wanted by Yacc.  */
 #define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
 
-struct GTY(()) lang_type {
-  /* In a RECORD_TYPE, a sorted array of the fields of the type.  */
-  struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
-  /* In an ENUMERAL_TYPE, the min and max values.  */
-  tree enum_min;
-  tree enum_max;
-  /* In a RECORD_TYPE, information specific to Objective-C, such
-     as a list of adopted protocols or a pointer to a corresponding
-     @interface.  See objc/objc-act.h for details.  */
-  tree objc_info;
-};
-
 /* Record whether a type or decl was written with nonconstant size.
    Note that TYPE_SIZE may have simplified to a constant.  */
 #define C_TYPE_VARIABLE_SIZE(TYPE) TYPE_LANG_FLAG_1 (TYPE)
@@ -382,22 +364,6 @@ struct c_parm {
   struct c_declarator *declarator;
 };
 
-/* Save and restore the variables in this file and elsewhere
-   that keep track of the progress of compilation of the current function.
-   Used for nested functions.  */
-
-struct GTY(()) language_function {
-  struct c_language_function base;
-  tree x_break_label;
-  tree x_cont_label;
-  struct c_switch * GTY((skip)) x_switch_stack;
-  struct c_arg_info * GTY((skip)) arg_info;
-  int returns_value;
-  int returns_null;
-  int returns_abnormally;
-  int warn_about_return_type;
-};
-
 /* Used when parsing an enum.  Initialized by start_enum.  */
 struct c_enum_contents
 {
@@ -444,7 +410,6 @@ extern void c_bindings_end_stmt_expr (struct c_spot_bindings *);
 extern void record_inline_static (location_t, tree, tree,
                                  enum c_inline_static_type);
 extern void c_init_decl_processing (void);
-extern void c_dup_lang_specific_decl (tree);
 extern void c_print_identifier (FILE *, tree, int);
 extern int quals_from_declspecs (const struct c_declspecs *);
 extern struct c_declarator *build_array_declarator (location_t, tree,
index 01cdcd201fe042af249298791ad7060347f0a922..abd78804aece585ac233bf7a451964333f0bd0a0 100644 (file)
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "langhooks.h"
 #include "c-tree.h"
+#include "c-lang.h"
 #include "tm_p.h"
 #include "flags.h"
 #include "output.h"
index 1b1e6fa70787b33b777bc1f318761db6b22419f4..7bc6a9e413df14c200d8e56f2703360dca57f8e2 100644 (file)
@@ -1741,6 +1741,8 @@ get_output_file_with_visibility (const char *input_file)
      headers with source files (and their special purpose gt-*.h headers).  */
   else if (strcmp (basename, "c-common.h") == 0)
     output_name = "gt-c-common.h", for_name = "c-common.c";
+  else if (strcmp (basename, "c-lang.h") == 0)
+    output_name = "gt-c-decl.h", for_name = "c-decl.c";
   else if (strcmp (basename, "c-tree.h") == 0)
     output_name = "gt-c-decl.h", for_name = "c-decl.c";
   else if (strncmp (basename, "cp", 2) == 0 && IS_DIR_SEPARATOR (basename[2])
index 55065e33636a568d98ab871db2512d65d227225a..f1b57228f66f81292091d2e5b0e7945aa9a49fc0 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-20  Richard Guenther  <rguenther@suse.de>
+
+       * objc-act.c: Include c-lang.h
+       * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
+
 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
            Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
index fad506b7640d7ebcb7035f3ace88a5b1859cc4f2..a09849717b2b7cfca21f7031134d0b683b2dec38 100644 (file)
@@ -79,7 +79,7 @@ objc/objc-act.o : objc/objc-act.c \
    $(EXPR_H) $(TARGET_H) $(C_TREE_H) $(DIAGNOSTIC_H) toplev.h $(FLAGS_H) \
    objc/objc-act.h input.h $(FUNCTION_H) output.h debug.h langhooks.h \
    $(LANGHOOKS_DEF_H) $(HASHTAB_H) $(C_PRAGMA_H) gt-objc-objc-act.h \
-   $(GIMPLE_H)
+   $(GIMPLE_H) c-lang.h
 
 objc.srcextra:
 
index c110c79d331f882dda9549e85e7b7e558df307dd..8b1a596c3237859e11c73906e42cf9870fee960b 100644 (file)
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #else
 #include "c-tree.h"
+#include "c-lang.h"
 #endif
 
 #include "c-common.h"
This page took 0.10408 seconds and 5 git commands to generate.