gcc/gcc/langhooks.h

381 lines
15 KiB
C
Raw Normal View History

/* The lang_hooks data structure.
Makefile.in (fold-const.o, [...]): Update. * Makefile.in (fold-const.o, stor-layout.o, stmt.o, sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. From-SVN: r51136
2002-03-21 19:39:29 +01:00
Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GCC_LANG_HOOKS_H
#define GCC_LANG_HOOKS_H
/* This file should be #include-d after tree.h. */
struct diagnostic_context;
Makefile.in: Update. * Makefile.in: Update. * c-decl.c (print_lang_decl, print_lang_type): Remove. (print_lang_identifier): Rename c_print_identifier. * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (print_lang_statistics, lang_print_xnode): Remove. * c-parse.in (set_yydebug): Rename c_set_yydebug. * c-tree.h (c_set_yydebug, c_print_identifier): New. * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New. LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. (lang_print_tree_hook): New. * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New. * print-tree.c: Include langhooks.h. (print_node): Update. * toplev.c (decode_d_option): Update. * tree.c: Include langhooks.h. (dump_tree_statistics): Update. * tree.h (print_lang_statistics, print_lang_decl, print_lang_type, print_lang_identifier, set_yydebug, lang_print_xnode): Remove. ada: * misc.c (gnat_print_decl, gnat_print_type): Renamed. (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override. (print_lang_statistics, lang_print_xnode, print_lang_identifier, set_yydebug): Remove. cp: * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. * cp-tree.h (print_class_statistics): Remove. (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, cxx_print_identifier, cxx_set_yydebug): New. * lex.c (set_yydebug): Rename c_set_yydebug. * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, lang_print_xnode): Rename. * tree.c (print_lang_statistics): Rename. f: * com.c (ffe_print_identifier): Rename. (LANG_HOOKS_PRINT_IDENTIFIER): Override. (lang_print_xnode, print_lang_decl, print_lang_statistics, print_lang_type, set_yydebug): Remove. java: * java-tree.h (java_set_yydebug): New. * jcf-parse.c (set_yydebug): Rename java_set_yydebug. * lang.c (LANG_HOOKS_SET_YYDEBUG): Override. (print_lang_decl, print_lang_type, print_lang_identifier, print_lang_statistics, lang_print_xnode): Remove. objc: * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. (lang_print_xnode, print_lang_statistics): Remove. From-SVN: r46907
2001-11-10 00:30:44 +01:00
/* A print hook for print_tree (). */
typedef void (*lang_print_tree_hook) PARAMS ((FILE *, tree, int indent));
/* The following hooks are documented in langhooks.c. Must not be
NULL. */
struct lang_hooks_for_tree_inlining
{
union tree_node *(*walk_subtrees) PARAMS ((union tree_node **, int *,
union tree_node *(*)
(union tree_node **,
int *, void *),
void *, void *));
int (*cannot_inline_tree_fn) PARAMS ((union tree_node **));
int (*disregard_inline_limits) PARAMS ((union tree_node *));
union tree_node *(*add_pending_fn_decls) PARAMS ((void *,
union tree_node *));
int (*tree_chain_matters_p) PARAMS ((union tree_node *));
int (*auto_var_in_fn_p) PARAMS ((union tree_node *, union tree_node *));
union tree_node *(*copy_res_decl_for_inlining) PARAMS ((union tree_node *,
union tree_node *,
union tree_node *,
void *, int *,
tree));
int (*anon_aggr_type_p) PARAMS ((union tree_node *));
bool (*var_mod_type_p) PARAMS ((union tree_node *));
int (*start_inlining) PARAMS ((union tree_node *));
void (*end_inlining) PARAMS ((union tree_node *));
union tree_node *(*convert_parm_for_inlining) PARAMS ((union tree_node *,
union tree_node *,
union tree_node *));
};
struct lang_hooks_for_callgraph
{
/* Function passed as argument is needed and will be compiled.
Lower the representation so the calls are explicit. */
void (*lower_function) PARAMS ((union tree_node *));
/* Produce RTL for function passed as argument. */
void (*expand_function) PARAMS ((union tree_node *));
};
Makefile.in: Update. * Makefile.in: Update. * decl.c (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. * c-tree.h (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. * function.c (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. (push_function_context_to, pop_function_context_from, free_after_parsing, prepare_function_start, ggc_mark_struct_function): Update. * function.h (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, LANG_HOOKS_FUNCTION_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. (lhd_do_nothing_f): New. * langhooks.h (struct lang_hooks_for_functions): New. (struct lang_hooks): New hooks. * langhooks.c (lhd_do_nothing_f): New. cp: * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, cxx_mark_function_context): New. * decl.c (push_cp_function_context, pop_cp_function_context, mark_cp_function_context): Rename for consistency. (cxx_init_decl_processing): Don't set old hooks. objc: * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. From-SVN: r52551
2002-04-20 11:14:37 +02:00
/* Lang hooks for management of language-specific data or status
when entering / leaving functions etc. */
struct lang_hooks_for_functions
{
/* Called when entering a function. */
void (*init) PARAMS ((struct function *));
/* Called when leaving a function. */
void (*final) PARAMS ((struct function *));
Makefile.in: Update. * Makefile.in: Update. * decl.c (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. * c-tree.h (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. * function.c (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. (push_function_context_to, pop_function_context_from, free_after_parsing, prepare_function_start, ggc_mark_struct_function): Update. * function.h (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, LANG_HOOKS_FUNCTION_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. (lhd_do_nothing_f): New. * langhooks.h (struct lang_hooks_for_functions): New. (struct lang_hooks): New hooks. * langhooks.c (lhd_do_nothing_f): New. cp: * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, cxx_mark_function_context): New. * decl.c (push_cp_function_context, pop_cp_function_context, mark_cp_function_context): Rename for consistency. (cxx_init_decl_processing): Don't set old hooks. objc: * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. From-SVN: r52551
2002-04-20 11:14:37 +02:00
/* Called when entering a nested function. */
void (*enter_nested) PARAMS ((struct function *));
/* Called when leaving a nested function. */
void (*leave_nested) PARAMS ((struct function *));
};
2001-11-22 03:33:02 +01:00
/* The following hooks are used by tree-dump.c. */
struct lang_hooks_for_tree_dump
{
/* Dump language-specific parts of tree nodes. Returns nonzero if it
2001-11-22 03:33:02 +01:00
does not want the usual dumping of the second argument. */
int (*dump_tree) PARAMS ((void *, tree));
/* Determine type qualifiers in a language-specific way. */
int (*type_quals) PARAMS ((tree));
};
/* Hooks related to types. */
struct lang_hooks_for_types
{
Makefile.in (convert.o, [...]): Update. * Makefile.in (convert.o, calls.o, expmed.o): Update. * attribs.c (handle_mode_attribute, handle_vector_size_attribute): Use new hooks. * builtin-types.def (BT_PTRMODE): Update. * c-common.c (type_for_size): Rename c_common_type_for_size. (type_for_mode): Similarly. (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): Use new hook. * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. * c-decl.c (finish_enum, build_enumerator): Use new hooks. * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * c-typeck.c (common_type, comptypes, default_conversion): Use new hooks. * calls.c: Include langhooks.h. (emit_library_call_value_1): Use new hooks. Avoid redundant calls. * convert.c: Include langhooks.h (convert_to_pointer, convert_to_integer): Use new hooks. * except.c (init_eh): Similarly. * expmed.c: Include langhooks.h. (expand_mult_add): Use new hooks. * expr.c (store_expr, store_constructor, expand_expr, do_jump, try_casesi): Similarly. * fold-const.c (optimize_bit_field_compare, make_range, decode_field_reference, fold_truthop, fold): Similarly. * function.c (assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack): Similarly. * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): New. (LANG_HOOKS_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New hooks. * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. * tree.c (get_unwidened, get_narrower): Similarly. * tree.h (type_for_mode, type_for_size): Remove. * varasm.c (force_const_mem): Use new hooks. ada: * gigi.h (type_for_size, type_for_mode): Rename. * misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * trans.c (tree_transform): Update. * utils.c (gnat_init_decl_processing, init_gigi_decls, builtin_function, float_type_for_size, signed_or_unsigned_type, build_vms_descriptor, unchecked_convert): Update. (type_for_mode, type_for_size): Rename. * utils2.c (nonbinary_modular_operation): Update. cp: * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. * decl.c (finish_enum): Similarly. * error.c (dump_type): Similarly. * lex.c (cxx_init): Similarly. * mangle.c (write_builtin_type): Similarly. * typeck.c (comptypes): Similarly. f: * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. (type_for_mode, type_for_size): Rename. (signed_or_unsigned_type, signed_type, truthvalue_conversion, unsigned_type): Use new hooks. java: * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. objc: * objc-act.c (handle_impent): Update. * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. From-SVN: r51571
2002-03-29 22:46:27 +01:00
/* Return a new type (with the indicated CODE), doing whatever
language-specific processing is required. */
tree (*make_type) PARAMS ((enum tree_code));
Makefile.in (convert.o, [...]): Update. * Makefile.in (convert.o, calls.o, expmed.o): Update. * attribs.c (handle_mode_attribute, handle_vector_size_attribute): Use new hooks. * builtin-types.def (BT_PTRMODE): Update. * c-common.c (type_for_size): Rename c_common_type_for_size. (type_for_mode): Similarly. (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): Use new hook. * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. * c-decl.c (finish_enum, build_enumerator): Use new hooks. * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * c-typeck.c (common_type, comptypes, default_conversion): Use new hooks. * calls.c: Include langhooks.h. (emit_library_call_value_1): Use new hooks. Avoid redundant calls. * convert.c: Include langhooks.h (convert_to_pointer, convert_to_integer): Use new hooks. * except.c (init_eh): Similarly. * expmed.c: Include langhooks.h. (expand_mult_add): Use new hooks. * expr.c (store_expr, store_constructor, expand_expr, do_jump, try_casesi): Similarly. * fold-const.c (optimize_bit_field_compare, make_range, decode_field_reference, fold_truthop, fold): Similarly. * function.c (assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack): Similarly. * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): New. (LANG_HOOKS_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New hooks. * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. * tree.c (get_unwidened, get_narrower): Similarly. * tree.h (type_for_mode, type_for_size): Remove. * varasm.c (force_const_mem): Use new hooks. ada: * gigi.h (type_for_size, type_for_mode): Rename. * misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * trans.c (tree_transform): Update. * utils.c (gnat_init_decl_processing, init_gigi_decls, builtin_function, float_type_for_size, signed_or_unsigned_type, build_vms_descriptor, unchecked_convert): Update. (type_for_mode, type_for_size): Rename. * utils2.c (nonbinary_modular_operation): Update. cp: * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. * decl.c (finish_enum): Similarly. * error.c (dump_type): Similarly. * lex.c (cxx_init): Similarly. * mangle.c (write_builtin_type): Similarly. * typeck.c (comptypes): Similarly. f: * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. (type_for_mode, type_for_size): Rename. (signed_or_unsigned_type, signed_type, truthvalue_conversion, unsigned_type): Use new hooks. java: * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. objc: * objc-act.c (handle_impent): Update. * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. From-SVN: r51571
2002-03-29 22:46:27 +01:00
/* Given MODE and UNSIGNEDP, return a suitable type-tree with that
mode. */
tree (*type_for_mode) PARAMS ((enum machine_mode, int));
/* Given PRECISION and UNSIGNEDP, return a suitable type-tree for an
integer type with at least that precision. */
tree (*type_for_size) PARAMS ((unsigned, int));
c-common.c (unsigned_conversion_warning, [...]): Use new hooks. * c-common.c (unsigned_conversion_warning, convert_and_check, unsigned_type, signed_type, shorten_compare, c_common_get_alias_set, c_common_nodes_and_builtins): Use new hooks. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * c-common.h (unsigned_type, signed_type, signed_or_unsigned_type): New. * c-decl.c (grokdeclarator): Update. * c-format.c (check_format_types): Update. * c-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * c-typeck.c (build_binary_op, convert_for_assignment): Update. * convert.c (convert_to_integer): Use new hooks. * expmed.c (make_tree): Use new hooks. * expr.c (store_expr): Use new hooks. * fold-const.c (operand_equal_for_comparison_p, build_range_check, all_ones_mask_p, unextend, fold): Use new hooks. * langhooks.h (struct lang_hooks_for_types): New hooks. * tree.h (signed_or_unsigned_type, signed_type, unsigned_type): Remove. ada: * gigi.h (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * misc.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * trans.c (tree_transform, convert_with_check): Update. * utils.c (unsigned_type, signed_type, signed_or_unsigned_type): Rename. cp: * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * decl.c (grokdeclarator): Update. * mangle.c (write_integer_cst): Update. * typeck.c (build_binary_op): Update. f: * com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. java: * expr.c (build_java_binop): Update. * java-tree.h (java_signed_type, java_unsigned_type, java_signed_or_unsigned_type): Update. * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * parse.y (patch_binop): Update. * typeck.c (signed_or_unsigned_type, unsigned_type, signed_type): Update. objc: * objc-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. From-SVN: r51684
2002-04-01 10:46:10 +02:00
/* Given an integer type T, return a type like T but unsigned.
If T is unsigned, the value is T. */
tree (*unsigned_type) PARAMS ((tree));
/* Given an integer type T, return a type like T but signed.
If T is signed, the value is T. */
tree (*signed_type) PARAMS ((tree));
/* Return a type the same as TYPE except unsigned or signed
according to UNSIGNEDP. */
tree (*signed_or_unsigned_type) PARAMS ((int, tree));
/* Given a type, apply default promotions to unnamed function
arguments and return the new type. Return the same type if no
change. Required by any language that supports variadic
arguments. The default hook aborts. */
tree (*type_promotes_to) PARAMS ((tree));
/* This routine is called in tree.c to print an error message for
invalid use of an incomplete type. VALUE is the expression that
was used (or 0 if that isn't known) and TYPE is the type that was
invalid. */
void (*incomplete_type_error) PARAMS ((tree value, tree type));
};
Makefile.in (fold-const.o, [...]): Update. * Makefile.in (fold-const.o, stor-layout.o, stmt.o, sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. From-SVN: r51136
2002-03-21 19:39:29 +01:00
/* Language hooks related to decls and the symbol table. */
struct lang_hooks_for_decls
{
/* Enter a new lexical scope. Argument is always zero when called
from outside the front end. */
void (*pushlevel) PARAMS ((int));
/* Exit a lexical scope and return a BINDING for that scope.
Takes three arguments:
KEEP -- nonzero if there were declarations in this scope.
REVERSE -- reverse the order of decls before returning them.
FUNCTIONBODY -- nonzero if this level is the body of a function. */
tree (*poplevel) PARAMS ((int, int, int));
/* Returns nonzero if we are in the global binding level. Ada
Makefile.in (fold-const.o, [...]): Update. * Makefile.in (fold-const.o, stor-layout.o, stmt.o, sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. From-SVN: r51136
2002-03-21 19:39:29 +01:00
returns -1 for an undocumented reason used in stor-layout.c. */
int (*global_bindings_p) PARAMS ((void));
/* Insert BLOCK at the end of the list of subblocks of the
current binding level. This is used when a BIND_EXPR is expanded,
to handle the BLOCK node inside the BIND_EXPR. */
void (*insert_block) PARAMS ((tree));
/* Set the BLOCK node for the current scope level. */
void (*set_block) PARAMS ((tree));
/* Function to add a decl to the current scope level. Takes one
argument, a decl to add. Returns that decl, or, if the same
symbol is already declared, may return a different decl for that
name. */
tree (*pushdecl) PARAMS ((tree));
/* Returns the chain of decls so far in the current scope level. */
tree (*getdecls) PARAMS ((void));
/* Returns true when we should warn for an unused global DECL.
We will already have checked that it has static binding. */
bool (*warn_unused_global) PARAMS ((tree));
Makefile.in (fold-const.o, [...]): Update. * Makefile.in (fold-const.o, stor-layout.o, stmt.o, sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. From-SVN: r51136
2002-03-21 19:39:29 +01:00
};
/* Language-specific hooks. See langhooks-def.h for defaults. */
struct lang_hooks
{
c-lang.c (LANG_HOOKS_NAME): New. * c-lang.c (LANG_HOOKS_NAME): New. (lang_hooks): Constify. (c_init_options): Update. (lang_identify): Remove. * c-parse.in (language_string): Remove. * dbxout.c: Include langhooks.h. (dbxout_symbol_location): Update. * dwarf2out.c: Include langhooks.h. (gen_compile_unit_die): Update. * dwarfout.c: Include langhooks.h. (prototyped_attribute, output_compile_unit_die): Update. * langhooks-def.h (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. Constify. * stringpool.c: Don't include toplev.h. (set_identifier_size): Remove. * toplev.c (toplev_main): Initialize identifier size. (print_version): Update. * tree.h (language_string, init_lex, lang_identify, set_identifier_size): Remove. * Makefile.in: Update dependencies. * config/darwin.c: Include langhooks.h. (func_name_maybe_scoped): Update. * config/darwin.h (ASM_END_FILE): Update. * config/nextstep.h (ASM_END_FILE): Update. * config/nextstep21.h (ASM_END_FILE): Update. * config/i386/sun386.h (ASM_END_FILE): Update. * config/rs6000/rs6000.c (ASM_END_FILE): Include langhooks.h. (rs6000_output_function_epilogue): Update. ada: * misc.c (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): Override. (struct lang_hooks): Constify. (language_string, lang_identify): Remove. * utils.c (init_decl_processing): Update. cp: * cp-lang.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. * lex.c (cxx_init_options): Update. (lang_identify): Remove. * parse.y (language_string): Remove. f: * com.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. java: * jcf-parse.c (init_lex): Remove. * lang.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. objc: * objc-act.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. (objc_init_options): Update. (lang_identify): Remove. From-SVN: r46874
2001-11-09 08:14:20 +01:00
/* String identifying the front end. e.g. "GNU C++". */
const char *name;
/* sizeof (struct lang_identifier), so make_node () creates
identifier nodes long enough for the language-specific slots. */
size_t identifier_size;
cppfiles.c (stack_include_file): Don't optimize zero-length files. * cppfiles.c (stack_include_file): Don't optimize zero-length files. (read_include_file): NUL-terminate read files. * cpplex.c (handle_newline, skip_escaped_newlines, get_effective_char, skip_whitespace, parse_identifier, parse_identifier_slow, parse_number, parse_string, _cpp_lex_direct): Optimize for the fact that buffers are guaranteed NUL-terminated. * cpplib.c (destringize_and_run, cpp_define, handle_assertion): Be sure buffers are NUL terminated. * cppmacro.c (warn_of_redefinition): Kill compile warning. * c-common.c: Include tree-inline.h. (c_language): Move separate definitions here. (c_common_init_options, c_common_post_options): New. (c_common_lang_init): Rename c_common_init. * c-common.h (c_common_lang_init): Similarly. (c_common_init_options, c_common_post_options): New. * c-lang.c (c_post_options): Move body to c_common_post_options. (c_init_options): Use c_common_init_options. (c_init): Update. * langhooks.def: Rearrange. * langhooks.h: Rearrange, and improve comments. * toplev.c (do_compile): New function. (toplev_main): Use it. (lang_independent_f_options, parse_options_and_default_flags, process_options): Remove trailing periods. * Makefile.in: Update. cp: * decl2.c (c_language): Move to c-common.c. * lex.c (cxx_post_options, cxx_init_options): Use c-common.c functions. (cxx_init): Update. objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c functions. (ojbc_init): Update. From-SVN: r47362
2001-11-27 00:44:54 +01:00
/* The first callback made to the front end, for simple
initialization needed before any calls to decode_option. */
void (*init_options) PARAMS ((void));
/* Function called with an option vector as argument, to decode a
single option (typically starting with -f or -W or +). It should
return the number of command-line arguments it uses if it handles
the option, or 0 and not complain if it does not recognize the
option. If this function returns a negative number, then its
absolute value is the number of command-line arguments used, but,
in addition, no language-independent option processing should be
done for this option. */
int (*decode_option) PARAMS ((int, char **));
cppfiles.c (stack_include_file): Don't optimize zero-length files. * cppfiles.c (stack_include_file): Don't optimize zero-length files. (read_include_file): NUL-terminate read files. * cpplex.c (handle_newline, skip_escaped_newlines, get_effective_char, skip_whitespace, parse_identifier, parse_identifier_slow, parse_number, parse_string, _cpp_lex_direct): Optimize for the fact that buffers are guaranteed NUL-terminated. * cpplib.c (destringize_and_run, cpp_define, handle_assertion): Be sure buffers are NUL terminated. * cppmacro.c (warn_of_redefinition): Kill compile warning. * c-common.c: Include tree-inline.h. (c_language): Move separate definitions here. (c_common_init_options, c_common_post_options): New. (c_common_lang_init): Rename c_common_init. * c-common.h (c_common_lang_init): Similarly. (c_common_init_options, c_common_post_options): New. * c-lang.c (c_post_options): Move body to c_common_post_options. (c_init_options): Use c_common_init_options. (c_init): Update. * langhooks.def: Rearrange. * langhooks.h: Rearrange, and improve comments. * toplev.c (do_compile): New function. (toplev_main): Use it. (lang_independent_f_options, parse_options_and_default_flags, process_options): Remove trailing periods. * Makefile.in: Update. cp: * decl2.c (c_language): Move to c-common.c. * lex.c (cxx_post_options, cxx_init_options): Use c-common.c functions. (cxx_init): Update. objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c functions. (ojbc_init): Update. From-SVN: r47362
2001-11-27 00:44:54 +01:00
/* Called when all command line options have been parsed. Should do
any required consistency checks, modifications etc. Complex
initialization should be left to the "init" callback, since GC
and the identifier hashes are set up between now and then.
Should return zero unless the compiler back-end does not need to
be initialized, such as with the -E option.
If errorcount is nonzero after this call the compiler exits
immediately and the finish hook is not called. */
bool (*post_options) PARAMS ((void));
cppfiles.c (stack_include_file): Don't optimize zero-length files. * cppfiles.c (stack_include_file): Don't optimize zero-length files. (read_include_file): NUL-terminate read files. * cpplex.c (handle_newline, skip_escaped_newlines, get_effective_char, skip_whitespace, parse_identifier, parse_identifier_slow, parse_number, parse_string, _cpp_lex_direct): Optimize for the fact that buffers are guaranteed NUL-terminated. * cpplib.c (destringize_and_run, cpp_define, handle_assertion): Be sure buffers are NUL terminated. * cppmacro.c (warn_of_redefinition): Kill compile warning. * c-common.c: Include tree-inline.h. (c_language): Move separate definitions here. (c_common_init_options, c_common_post_options): New. (c_common_lang_init): Rename c_common_init. * c-common.h (c_common_lang_init): Similarly. (c_common_init_options, c_common_post_options): New. * c-lang.c (c_post_options): Move body to c_common_post_options. (c_init_options): Use c_common_init_options. (c_init): Update. * langhooks.def: Rearrange. * langhooks.h: Rearrange, and improve comments. * toplev.c (do_compile): New function. (toplev_main): Use it. (lang_independent_f_options, parse_options_and_default_flags, process_options): Remove trailing periods. * Makefile.in: Update. cp: * decl2.c (c_language): Move to c-common.c. * lex.c (cxx_post_options, cxx_init_options): Use c-common.c functions. (cxx_init): Update. objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c functions. (ojbc_init): Update. From-SVN: r47362
2001-11-27 00:44:54 +01:00
/* Called after post_options, to initialize the front end. The main
input filename is passed, which may be NULL; the front end should
return the original filename (e.g. foo.i -> foo.c). Return NULL
to indicate a serious error of some sort; in that case no
compilation is performed, and the finish hook is called
immediately. */
const char * (*init) PARAMS ((const char *));
/* Called at the end of compilation, as a finalizer. */
void (*finish) PARAMS ((void));
/* Parses the entire file. The argument is nonzero to cause bison
parsers to dump debugging information during parsing. */
void (*parse_file) PARAMS ((int));
cppfiles.c (stack_include_file): Don't optimize zero-length files. * cppfiles.c (stack_include_file): Don't optimize zero-length files. (read_include_file): NUL-terminate read files. * cpplex.c (handle_newline, skip_escaped_newlines, get_effective_char, skip_whitespace, parse_identifier, parse_identifier_slow, parse_number, parse_string, _cpp_lex_direct): Optimize for the fact that buffers are guaranteed NUL-terminated. * cpplib.c (destringize_and_run, cpp_define, handle_assertion): Be sure buffers are NUL terminated. * cppmacro.c (warn_of_redefinition): Kill compile warning. * c-common.c: Include tree-inline.h. (c_language): Move separate definitions here. (c_common_init_options, c_common_post_options): New. (c_common_lang_init): Rename c_common_init. * c-common.h (c_common_lang_init): Similarly. (c_common_init_options, c_common_post_options): New. * c-lang.c (c_post_options): Move body to c_common_post_options. (c_init_options): Use c_common_init_options. (c_init): Update. * langhooks.def: Rearrange. * langhooks.h: Rearrange, and improve comments. * toplev.c (do_compile): New function. (toplev_main): Use it. (lang_independent_f_options, parse_options_and_default_flags, process_options): Remove trailing periods. * Makefile.in: Update. cp: * decl2.c (c_language): Move to c-common.c. * lex.c (cxx_post_options, cxx_init_options): Use c-common.c functions. (cxx_init): Update. objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c functions. (ojbc_init): Update. From-SVN: r47362
2001-11-27 00:44:54 +01:00
/* Called immediately after parsing to clear the binding stack. */
void (*clear_binding_stack) PARAMS ((void));
/* Called to obtain the alias set to be used for an expression or type.
Returns -1 if the language does nothing special for it. */
HOST_WIDE_INT (*get_alias_set) PARAMS ((tree));
Makefile.in (c-lang.o): Depends on langhooks-def.h. * Makefile.in (c-lang.o): Depends on langhooks-def.h. (expr.o, varasm.o): Depends on langhooks.h. * c-common.c (c_safe_from_p): Always declare. (c_expand_expr): Refine when declared. * c-lang.c (c-common.h): Now include. (LANG_HOOKS_SAFE_FROM_P): Define new hook. (c_init): Don't set lang_safe_from_expr. * expr.c (langhooks.h): Now include. (lang_safe_from_p): No longer define. (safe_from_p): Use lang hook. (expand_expr): Set IGNORE if VOID_TYPE result of VIEW_CONVERT_EXPR too. (expand_expr, case VIEW_CONVERT_EXPR): Pass ro_modifier down. * expr.h (lang_expand_constant, lang_safe_from_p): Delete. * langhooks-def.h (lhd_return_tree, lhd_safe_from_p): New decls. (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. * langhooks.c (lhd_return_tree, lhd_safe_from_p): New functions. * langhooks.h (struct lang_hooks): New fields expand_constant and safe_from_p. * output.h (output_constant): Size arg is HOST_WIDE_INT. * stmt.c (expand_decl_init): No longer need to expand constant for CONST_DECL. * stor-layout.c (put_pending_size): Don't check for SAVE_EXPR. * toplev.c (lang_expand_constant): Delete var. * tree.c (save_expr): Don't put another SAVE_EXPR around simple operations on SAVE_EXPR. * varasm.c (langhooks.h): Now include. (compare_constant_1): Use lang_hooks, not lang_expand_constant. (record_constant_1, output_addressed_constants): Likewise. (initializer_constant_valid_p, output_constant): Likewise. (output_constant_def): Process no-defer of string constant. (output_addressed_constants, case ADDR_EXPR): Use handled_component_p. (output_constant): Strip more conversions. Track our size and pad for the rest. (array_size_for_constructor): Remove code for non-byte STRING_CST. (output_constructor): SIZE now HOST_WIDE_INT. * cp/Make-lang.in (cp-lang.o): Depends on c-common.h. * cp/cp-lang.c (c-common.h): Include. (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. * cp/decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. * cp/expr.c (init_cplus_expand): Don't set lang_expand_constant. From-SVN: r47376
2001-11-27 15:31:29 +01:00
/* Called with an expression that is to be processed as a constant.
Returns either the same expression or a language-independent
constant equivalent to its input. */
tree (*expand_constant) PARAMS ((tree));
/* Called by expand_expr for language-specific tree codes.
Fourth argument is actually an enum expand_modifier. */
rtx (*expand_expr) PARAMS ((tree, rtx, enum machine_mode, int));
c-common.c (truthvalue_conversion): Rename, update. * c-common.c (truthvalue_conversion): Rename, update. * c-common.h (c_common_truthvalue_conversion): New. * c-convert.c (convert): Update. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update. * c-typeck.c (build_binary_op, build_unary_op, build_conditional_expr): Update. * fold-const.c (constant_boolean_node, fold): Use langhook. * langhooks-def.h (LANGHOOK_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_decl_cleanup): Use langhook. * tree.h (truthvalue_conversion): Remove. ada: * gigi.h (truthvalue_conversion): Rename. * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * trans.c (tree_transform): Update. * utils2.c (truthvalue_conversion): Rename, update. (build_binary_op, build_unary_op): Update. cp: * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * cvt.c: Update comment. * init.c (expand_cleanup_for_base): Update. * semantics.c (finish_parenthesized_expr): Update. * typeck.c (cp_truthvalue_conversion): Update. f: * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. (truthvalue_conversion): Rename. Update. Make static. (ffecom_truth_value): Update. java: * expr.c (truthvalue_conversion): Rename. Update. (expand_compare): Update. * java-tree.h (java_truthvalue_conversion): New. * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. objc: * objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. From-SVN: r51880
2002-04-05 00:19:58 +02:00
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation.
This preparation consists of taking the ordinary representation
of an expression expr and producing a valid tree boolean
expression describing whether expr is nonzero. We could simply
always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1),
but we optimize comparisons, &&, ||, and !.
The result should be an expression of boolean type (if not an
error_mark_node). */
tree (*truthvalue_conversion) PARAMS ((tree));
/* Possibly apply default attributes to a function (represented by
a FUNCTION_DECL). */
void (*insert_default_attributes) PARAMS ((tree));
Makefile.in (c-lang.o): Depends on langhooks-def.h. * Makefile.in (c-lang.o): Depends on langhooks-def.h. (expr.o, varasm.o): Depends on langhooks.h. * c-common.c (c_safe_from_p): Always declare. (c_expand_expr): Refine when declared. * c-lang.c (c-common.h): Now include. (LANG_HOOKS_SAFE_FROM_P): Define new hook. (c_init): Don't set lang_safe_from_expr. * expr.c (langhooks.h): Now include. (lang_safe_from_p): No longer define. (safe_from_p): Use lang hook. (expand_expr): Set IGNORE if VOID_TYPE result of VIEW_CONVERT_EXPR too. (expand_expr, case VIEW_CONVERT_EXPR): Pass ro_modifier down. * expr.h (lang_expand_constant, lang_safe_from_p): Delete. * langhooks-def.h (lhd_return_tree, lhd_safe_from_p): New decls. (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. * langhooks.c (lhd_return_tree, lhd_safe_from_p): New functions. * langhooks.h (struct lang_hooks): New fields expand_constant and safe_from_p. * output.h (output_constant): Size arg is HOST_WIDE_INT. * stmt.c (expand_decl_init): No longer need to expand constant for CONST_DECL. * stor-layout.c (put_pending_size): Don't check for SAVE_EXPR. * toplev.c (lang_expand_constant): Delete var. * tree.c (save_expr): Don't put another SAVE_EXPR around simple operations on SAVE_EXPR. * varasm.c (langhooks.h): Now include. (compare_constant_1): Use lang_hooks, not lang_expand_constant. (record_constant_1, output_addressed_constants): Likewise. (initializer_constant_valid_p, output_constant): Likewise. (output_constant_def): Process no-defer of string constant. (output_addressed_constants, case ADDR_EXPR): Use handled_component_p. (output_constant): Strip more conversions. Track our size and pad for the rest. (array_size_for_constructor): Remove code for non-byte STRING_CST. (output_constructor): SIZE now HOST_WIDE_INT. * cp/Make-lang.in (cp-lang.o): Depends on c-common.h. * cp/cp-lang.c (c-common.h): Include. (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. * cp/decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. * cp/expr.c (init_cplus_expand): Don't set lang_expand_constant. From-SVN: r47376
2001-11-27 15:31:29 +01:00
/* Hook called by safe_from_p for language-specific tree codes. It is
up to the language front-end to install a hook if it has any such
codes that safe_from_p needs to know about. Since same_from_p will
recursively explore the TREE_OPERANDs of an expression, this hook
should not reexamine those pieces. This routine may recursively
call safe_from_p; it should always pass `0' as the TOP_P
parameter. */
int (*safe_from_p) PARAMS ((rtx, tree));
/* Function to finish handling an incomplete decl at the end of
compilation. Default hook is does nothing. */
void (*finish_incomplete_decl) PARAMS ((tree));
/* Function used by unsafe_for_reeval. A non-negative number is
returned directly from unsafe_for_reeval, a negative number falls
through. The default hook returns a negative number. */
int (*unsafe_for_reeval) PARAMS ((tree));
c-decl.c (grokdeclarator): Update. * c-decl.c (grokdeclarator): Update. * c-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * c-tree.h (c_mark_addressable): New. * c-typeck.c (default_function_array_conversion, build_unary_op, build_array_ref, convert_for_assignment): Update. (mark_addressable): Rename. * calls.c (try_to_integrate, expand_call): Use langhook. * expr.c (expand_expr): Use langhook. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_asm_operands): Use langhook. * tree.h (mark_addressable): Remove. ada: * decl.c (gnat_to_gnu_entity): Update. * gigi.h (mark_addressable): Rename. * misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * trans.c (tree_transform): Update. * utils.c (create_var_decl): Update. * util2.c (build_binary_op, build_unary_op, fill_vms_descriptor): Update. (mark_addressable): Rename, update. cp: * call.c (build_addr_func): Update. * class.c (resolve_address_of_overloaded_function): Update. * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * cp-tree.h (cxx_mark_addressable): New. * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. * decl2.c (build_cleanup): Update. * except.c (build_throw): Update. * init.c (resolve_offset_ref): Update. * pt.c (convert_nontype_argument): Update. * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. * typeck.c (decay_conversion, build_array_ref, build_unary_op, unary_complex_lvalue): Update. (mark_addressable): Rename. f: * com.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. (mark_addressable): Rename. (ffecom_arrayref_, ffecom_1): Update. java: * java-tree.h (java_mark_addressable): New. * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * typeck.c (mark_addressable): Rename, update. objc: * objc-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. From-SVN: r51705
2002-04-01 22:26:18 +02:00
/* Mark EXP saying that we need to be able to take the address of
it; it should not be allocated in a register. Return true if
successful. */
bool (*mark_addressable) PARAMS ((tree));
/* Hook called by staticp for language-specific tree codes. */
int (*staticp) PARAMS ((tree));
/* Replace the DECL_LANG_SPECIFIC data, which may be NULL, of the
DECL_NODE with a newly GC-allocated copy. */
void (*dup_lang_specific_decl) PARAMS ((tree));
/* Called before its argument, an UNSAVE_EXPR, is to be
unsaved. Modify it in-place so that all the evaluate only once
things are cleared out. */
tree (*unsave_expr_now) PARAMS ((tree));
/* Called by expand_expr to build and return the cleanup-expression
for the passed TARGET_EXPR. Return NULL if there is none. */
tree (*maybe_build_cleanup) PARAMS ((tree));
/* Set the DECL_ASSEMBLER_NAME for a node. If it is the sort of
thing that the assembler should talk about, set
DECL_ASSEMBLER_NAME to an appropriate IDENTIFIER_NODE.
Otherwise, set it to the ERROR_MARK_NODE to ensure that the
assembler does not talk about it. */
void (*set_decl_assembler_name) PARAMS ((tree));
/* Return nonzero if fold-const is free to use bit-field
optimizations, for instance in fold_truthop(). */
bool (*can_use_bit_fields_p) PARAMS ((void));
/* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */
bool honor_readonly;
Makefile.in: Update. * Makefile.in: Update. * c-decl.c (print_lang_decl, print_lang_type): Remove. (print_lang_identifier): Rename c_print_identifier. * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (print_lang_statistics, lang_print_xnode): Remove. * c-parse.in (set_yydebug): Rename c_set_yydebug. * c-tree.h (c_set_yydebug, c_print_identifier): New. * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New. LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. (lang_print_tree_hook): New. * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New. * print-tree.c: Include langhooks.h. (print_node): Update. * toplev.c (decode_d_option): Update. * tree.c: Include langhooks.h. (dump_tree_statistics): Update. * tree.h (print_lang_statistics, print_lang_decl, print_lang_type, print_lang_identifier, set_yydebug, lang_print_xnode): Remove. ada: * misc.c (gnat_print_decl, gnat_print_type): Renamed. (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override. (print_lang_statistics, lang_print_xnode, print_lang_identifier, set_yydebug): Remove. cp: * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. * cp-tree.h (print_class_statistics): Remove. (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, cxx_print_identifier, cxx_set_yydebug): New. * lex.c (set_yydebug): Rename c_set_yydebug. * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, lang_print_xnode): Rename. * tree.c (print_lang_statistics): Rename. f: * com.c (ffe_print_identifier): Rename. (LANG_HOOKS_PRINT_IDENTIFIER): Override. (lang_print_xnode, print_lang_decl, print_lang_statistics, print_lang_type, set_yydebug): Remove. java: * java-tree.h (java_set_yydebug): New. * jcf-parse.c (set_yydebug): Rename java_set_yydebug. * lang.c (LANG_HOOKS_SET_YYDEBUG): Override. (print_lang_decl, print_lang_type, print_lang_identifier, print_lang_statistics, lang_print_xnode): Remove. objc: * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. (lang_print_xnode, print_lang_statistics): Remove. From-SVN: r46907
2001-11-10 00:30:44 +01:00
/* The front end can add its own statistics to -fmem-report with
this hook. It should output to stderr. */
void (*print_statistics) PARAMS ((void));
/* Called by print_tree when there is a tree of class 'x' that it
doesn't know how to display. */
lang_print_tree_hook print_xnode;
/* Called to print language-dependent parts of a class 'd', class
't', and IDENTIFIER_NODE nodes. */
lang_print_tree_hook print_decl;
lang_print_tree_hook print_type;
lang_print_tree_hook print_identifier;
Makefile.in: Update. * Makefile.in: Update. * c-common.c: Include langhooks.h. (inline_forbidden_p): Use new hook. * diagnostic.c: Include langhooks.h. (format_with_decl, announce_function, default_print_error_function): Use new hook. * dwarf2out.c (dwarf2_name): Use new hook. * function.c: Include langhooks.h. (init_function_start): Use new hook. * langhooks-def.h (lhd_decl_printable_name): New. (LANGHOOKS_DECL_PRINTABLE_NAME): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_decl_printable_name): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (decl_name, decl_printable_name): Remove. (open_dump_file): Use new hook. (process_options): Remove old hook. * tree.h (decl_printable_name): Remove. ada: * misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (gnat_init): Remove old hook. cp: * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. * cp-tree.h (lang_printable_name): Rename. * error.c (lang_decl_name): Use new hook. * lex.c (cxx_init): Remove old hook. * pt.c (tsubst_expr): Use new hook. * tree.c (lang_printable_name): Rename. f: * com.c (lang_printable_name): Rename. (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (ffe_init): Don't use old hook. java: * decl.c (start_java_method): Use new hook. * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (java_init): Remove old hook. objc: * objc-act.c (objc_init): Remove old hook. (objc_printable_name): Export. * objc-act.h (objc_printable_name): New. * objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. From-SVN: r51066
2002-03-20 08:58:41 +01:00
/* Computes the name to use to print a declaration. DECL is the
non-NULL declaration in question. VERBOSITY determines what
information will be printed: 0: DECL_NAME, demangled as
necessary. 1: and scope information. 2: and any other
information that might be interesting, such as function parameter
types in C++. */
const char *(*decl_printable_name) PARAMS ((tree decl, int verbosity));
/* Called by report_error_function to print out function name. */
void (*print_error_function) PARAMS ((struct diagnostic_context *,
const char *));
/* Called from expr_size to calculate the size of the value of an
expression in a language-dependent way. Returns a tree for the size
in bytes. A frontend can call lhd_expr_size to get the default
semantics in cases that it doesn't want to handle specially. */
tree (*expr_size) PARAMS ((tree));
attribs.c (c_common_attribute_table): Move table and handlers to c-common.c. * attribs.c (c_common_attribute_table): Move table and handlers to c-common.c. (format_attribute_table, lang_attribute_table, lang_attribute_common): Remove. (init_attributes): Replace NULL pointers with pointers to the empty table. (handle_packed_attribute, handle_nocommon_attribute, handle_common_attribute, handle_noreturn_attribute, handle_noinline_attribute, handle_always_inline_attribute, handle_used_attribute, handle_unused_attribute, handle_const_attribute, handle_transparent_union_attribute, handle_constructor_attribute, handle_destructor_attribute, handle_mode_attribute, handle_section_attribute, handle_aligned_attribute, handle_weak_attribute, handle_alias_attribute, handle_visibility_attribute, handle_no_instrument_function_attribute, handle_malloc_attribute, handle_no_limit_stack_attribute, handle_pure_attribute, handle_deprecated_attribute, handle_vector_size_attribute, vector_size_helper): Move to c-common.c. * c-common.c (c_common_attribute_table, handle_packed_attribute, handle_nocommon_attribute, handle_common_attribute, handle_noreturn_attribute, handle_noinline_attribute, handle_always_inline_attribute, handle_used_attribute, handle_unused_attribute, handle_const_attribute, handle_transparent_union_attribute, handle_constructor_attribute, handle_destructor_attribute, handle_mode_attribute, handle_section_attribute, handle_aligned_attribute, handle_weak_attribute, handle_alias_attribute, handle_visibility_attribute, handle_no_instrument_function_attribute, handle_malloc_attribute, handle_no_limit_stack_attribute, handle_pure_attribute, handle_deprecated_attribute, handle_vector_size_attribute, vector_size_helper): Move from attribs.c. * c-common.h (c_common_attribute_table, c_common_format_attribute_table): New. * c-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Redefine. * langhooks-def.h (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): 3 new attribute hooks. * target-def.h (TARGET_ATTRIBUTE_TABLE): Default to NULL. * target.h: Update comment. * tree.c (default_target_attribute_table): Remove. * tree.h (default_target_attribute_table, format_attribute_table, lang_attribute_table, lang_attribute_common): Remove. ada: * misc.c (gnat_init): Don't set lang_attribute_common. cp: * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine. * cp-tree.h (cp_attribute_table): Rename. * decl.c (lang_attribute_table): Remove declaration. (cxx_init_decl_processing): Don't set it. * tree.c (cp_attribute_table): Rename. objc: * objc-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Redefine. From-SVN: r52730
2002-04-24 22:41:04 +02:00
/* Pointers to machine-independent attribute tables, for front ends
using attribs.c. If one is NULL, it is ignored. Respectively, a
table of attributes specific to the language, a table of
attributes common to two or more languages (to allow easy
sharing), and a table of attributes for checking formats. */
const struct attribute_spec *attribute_table;
const struct attribute_spec *common_attribute_table;
const struct attribute_spec *format_attribute_table;
Makefile.in: Update. * Makefile.in: Update. * decl.c (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. * c-tree.h (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. * function.c (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. (push_function_context_to, pop_function_context_from, free_after_parsing, prepare_function_start, ggc_mark_struct_function): Update. * function.h (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, LANG_HOOKS_FUNCTION_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. (lhd_do_nothing_f): New. * langhooks.h (struct lang_hooks_for_functions): New. (struct lang_hooks): New hooks. * langhooks.c (lhd_do_nothing_f): New. cp: * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, cxx_mark_function_context): New. * decl.c (push_cp_function_context, pop_cp_function_context, mark_cp_function_context): Rename for consistency. (cxx_init_decl_processing): Don't set old hooks. objc: * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. From-SVN: r52551
2002-04-20 11:14:37 +02:00
/* Function-related language hooks. */
struct lang_hooks_for_functions function;
struct lang_hooks_for_tree_inlining tree_inlining;
struct lang_hooks_for_callgraph callgraph;
2001-11-22 03:33:02 +01:00
struct lang_hooks_for_tree_dump tree_dump;
Makefile.in (fold-const.o, [...]): Update. * Makefile.in (fold-const.o, stor-layout.o, stmt.o, sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. From-SVN: r51136
2002-03-21 19:39:29 +01:00
struct lang_hooks_for_decls decls;
struct lang_hooks_for_types types;
2001-11-22 03:33:02 +01:00
/* Whenever you add entries here, make sure you adjust langhooks-def.h
and langhooks.c accordingly. */
};
/* Each front end provides its own. */
c-lang.c (LANG_HOOKS_NAME): New. * c-lang.c (LANG_HOOKS_NAME): New. (lang_hooks): Constify. (c_init_options): Update. (lang_identify): Remove. * c-parse.in (language_string): Remove. * dbxout.c: Include langhooks.h. (dbxout_symbol_location): Update. * dwarf2out.c: Include langhooks.h. (gen_compile_unit_die): Update. * dwarfout.c: Include langhooks.h. (prototyped_attribute, output_compile_unit_die): Update. * langhooks-def.h (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New members. Constify. * stringpool.c: Don't include toplev.h. (set_identifier_size): Remove. * toplev.c (toplev_main): Initialize identifier size. (print_version): Update. * tree.h (language_string, init_lex, lang_identify, set_identifier_size): Remove. * Makefile.in: Update dependencies. * config/darwin.c: Include langhooks.h. (func_name_maybe_scoped): Update. * config/darwin.h (ASM_END_FILE): Update. * config/nextstep.h (ASM_END_FILE): Update. * config/nextstep21.h (ASM_END_FILE): Update. * config/i386/sun386.h (ASM_END_FILE): Update. * config/rs6000/rs6000.c (ASM_END_FILE): Include langhooks.h. (rs6000_output_function_epilogue): Update. ada: * misc.c (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): Override. (struct lang_hooks): Constify. (language_string, lang_identify): Remove. * utils.c (init_decl_processing): Update. cp: * cp-lang.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. * lex.c (cxx_init_options): Update. (lang_identify): Remove. * parse.y (language_string): Remove. f: * com.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. java: * jcf-parse.c (init_lex): Remove. * lang.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. objc: * objc-act.c (LANG_HOOKS_NAME): Override. (struct lang_hooks): Constify. (objc_init_options): Update. (lang_identify): Remove. From-SVN: r46874
2001-11-09 08:14:20 +01:00
extern const struct lang_hooks lang_hooks;
#endif /* GCC_LANG_HOOKS_H */