From 38a8aecfb882072900434499696b5c32a2274515 Mon Sep 17 00:00:00 2001 From: Rong Xu Date: Mon, 21 Jul 2014 16:47:22 -0700 Subject: [4.9] Switch gcc-4.9 to use google/gcc-4_9 branch. This source drop uses svn version r212828 of google/gcc-4.9 branch. We also cherry-picked r213062, r213063 and r213064 to fix windows build issues. All gcc-4.9 patches before July 3rd are ported to google/gcc-4.9. The following prior commits has not been merged to google branch yet. (They are included in this commit). e7af147f979e657fe2df00808e5b4319b0e088c6, baf87df3cb2683649ba7e9872362a7e721117c23, and c231900e5dcc14d8296bd9f62b45997a49d4d5e7. Change-Id: I4bea3ea470387ff751c2be4cb0d4a12059b9299b --- gcc-4.9/gcc/cp/cp-lang.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'gcc-4.9/gcc/cp/cp-lang.c') diff --git a/gcc-4.9/gcc/cp/cp-lang.c b/gcc-4.9/gcc/cp/cp-lang.c index c28c07a9d..22f8e4bbb 100644 --- a/gcc-4.9/gcc/cp/cp-lang.c +++ b/gcc-4.9/gcc/cp/cp-lang.c @@ -37,6 +37,7 @@ enum c_language_kind c_language = clk_cxx; static void cp_init_ts (void); static const char * cxx_dwarf_name (tree t, int verbosity); static enum classify_record cp_classify_record (tree type); +static bool cp_user_conv_function_p (tree); static tree cp_eh_personality (void); static tree get_template_innermost_arguments_folded (const_tree); static tree get_template_argument_pack_elems_folded (const_tree); @@ -77,11 +78,46 @@ static tree get_template_argument_pack_elems_folded (const_tree); #define LANG_HOOKS_DWARF_NAME cxx_dwarf_name #undef LANG_HOOKS_INIT_TS #define LANG_HOOKS_INIT_TS cp_init_ts +#undef LANG_HOOKS_USER_CONV_FUNCTION +#define LANG_HOOKS_USER_CONV_FUNCTION cp_user_conv_function_p #undef LANG_HOOKS_EH_PERSONALITY #define LANG_HOOKS_EH_PERSONALITY cp_eh_personality #undef LANG_HOOKS_EH_RUNTIME_TYPE #define LANG_HOOKS_EH_RUNTIME_TYPE build_eh_type_type + +/* LIPO support. */ +#undef LANG_HOOKS_ADD_BUILT_IN_DECL +#define LANG_HOOKS_ADD_BUILT_IN_DECL cp_add_built_in_decl +#undef LANG_HOOKS_SAVE_BUILT_IN_PRE +#define LANG_HOOKS_SAVE_BUILT_IN_PRE cp_save_built_in_decl_pre_parsing +#undef LANG_HOOKS_RESTORE_BUILT_IN_PRE +#define LANG_HOOKS_RESTORE_BUILT_IN_PRE cp_restore_built_in_decl_pre_parsing +#undef LANG_HOOKS_SAVE_BUILT_IN_POST +#define LANG_HOOKS_SAVE_BUILT_IN_POST cp_save_built_in_decl_post_parsing +#undef LANG_HOOKS_RESTORE_BUILT_IN_POST +#define LANG_HOOKS_RESTORE_BUILT_IN_POST cp_restore_built_in_decl_post_parsing +#undef LANG_HOOKS_CLEAR_NAME_BINDINGS +#define LANG_HOOKS_CLEAR_NAME_BINDINGS cp_clear_global_name_bindings +#undef LANG_HOOKS_HAS_GLOBAL_NAME +#define LANG_HOOKS_HAS_GLOBAL_NAME cp_is_non_sharable_global_decl +#undef LANG_HOOKS_GET_LANG_DECL_SIZE +#define LANG_HOOKS_GET_LANG_DECL_SIZE cp_get_lang_decl_size +#undef LANG_HOOKS_DUP_LANG_TYPE +#define LANG_HOOKS_DUP_LANG_TYPE cp_lipo_dup_lang_type +#undef LANG_HOOKS_COPY_LANG_TYPE +#define LANG_HOOKS_COPY_LANG_TYPE cp_lipo_copy_lang_type +#undef LANG_HOOKS_PROCESS_PENDING_DECLS +#define LANG_HOOKS_PROCESS_PENDING_DECLS cp_process_pending_declarations +#undef LANG_HOOKS_CLEAR_DEFFERED_FNS +#define LANG_HOOKS_CLEAR_DEFFERED_FNS cp_clear_deferred_fns +#undef LANG_HOOKS_IS_GENERATED_TYPE +#define LANG_HOOKS_IS_GENERATED_TYPE cp_is_compiler_generated_type +#undef LANG_HOOKS_CMP_LANG_TYPE +#define LANG_HOOKS_CMP_LANG_TYPE cp_cmp_lang_type + + + /* Each front end provides its own lang hook initializer. */ struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; @@ -134,6 +170,13 @@ cp_classify_record (tree type) return RECORD_IS_STRUCT; } +static bool +cp_user_conv_function_p (tree decl) +{ + return DECL_CONV_FN_P (decl); +} + + static GTY(()) tree cp_eh_personality_decl; static tree -- cgit v1.2.3