mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-03 05:10:26 +08:00
c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not define.
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
This commit is contained in:
parent
f88facfe93
commit
29cc57cf00
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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"
|
||||
|
16
gcc/c-decl.c
16
gcc/c-decl.c
@ -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
|
||||
|
60
gcc/c-lang.h
Normal file
60
gcc/c-lang.h
Normal file
@ -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 */
|
@ -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
|
||||
|
35
gcc/c-tree.h
35
gcc/c-tree.h
@ -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,
|
||||
|
@ -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"
|
||||
|
@ -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])
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user