aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/cp/cp-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/cp/cp-lang.c')
-rw-r--r--gcc-4.9/gcc/cp/cp-lang.c43
1 files changed, 43 insertions, 0 deletions
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