00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCC_LANG_HOOKS_DEF_H
00026 #define GCC_LANG_HOOKS_DEF_H
00027
00028 #include "hooks.h"
00029
00030 struct diagnostic_context;
00031
00032
00033
00034 extern HOST_WIDE_INT hook_get_alias_set_0 (tree);
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 extern void lhd_do_nothing (void);
00046 extern void lhd_do_nothing_t (tree);
00047 extern void lhd_do_nothing_i (int);
00048 extern void lhd_do_nothing_f (struct function *);
00049 extern bool lhd_post_options (const char **);
00050 extern HOST_WIDE_INT lhd_get_alias_set (tree);
00051 extern tree lhd_return_tree (tree);
00052 extern tree lhd_return_null_tree_v (void);
00053 extern tree lhd_return_null_tree (tree);
00054 extern tree lhd_do_nothing_iii_return_null_tree (int, int, int);
00055 extern int lhd_safe_from_p (rtx, tree);
00056 extern tree lhd_staticp (tree);
00057 extern void lhd_print_tree_nothing (FILE *, tree, int);
00058 extern const char *lhd_decl_printable_name (tree, int);
00059 extern const char *lhd_dwarf_name (tree, int);
00060 extern int lhd_types_compatible_p (tree, tree);
00061 extern rtx lhd_expand_expr (tree, rtx, enum machine_mode, int, rtx *);
00062 extern int lhd_expand_decl (tree);
00063 extern void lhd_print_error_function (struct diagnostic_context *,
00064 const char *);
00065 extern void lhd_set_decl_assembler_name (tree);
00066 extern bool lhd_can_use_bit_fields_p (void);
00067 extern bool lhd_warn_unused_global_decl (tree);
00068 extern void lhd_incomplete_type_error (tree, tree);
00069 extern tree lhd_type_promotes_to (tree);
00070 extern void lhd_register_builtin_type (tree, const char *);
00071 extern bool lhd_decl_ok_for_sibcall (tree);
00072 extern const char *lhd_comdat_group (tree);
00073 extern tree lhd_expr_size (tree);
00074 extern size_t lhd_tree_size (enum tree_code);
00075 extern HOST_WIDE_INT lhd_to_target_charset (HOST_WIDE_INT);
00076 extern tree lhd_expr_to_decl (tree, bool *, bool *, bool *);
00077
00078
00079 extern tree lhd_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn,
00080 void *, struct pointer_set_t*);
00081 extern int lhd_tree_inlining_cannot_inline_tree_fn (tree *);
00082 extern int lhd_tree_inlining_disregard_inline_limits (tree);
00083 extern tree lhd_tree_inlining_add_pending_fn_decls (void *, tree);
00084 extern int lhd_tree_inlining_auto_var_in_fn_p (tree, tree);
00085 extern int lhd_tree_inlining_anon_aggr_type_p (tree);
00086 extern int lhd_tree_inlining_start_inlining (tree);
00087 extern void lhd_tree_inlining_end_inlining (tree);
00088 extern tree lhd_tree_inlining_convert_parm_for_inlining (tree, tree, tree, int);
00089 extern void lhd_initialize_diagnostics (struct diagnostic_context *);
00090 extern tree lhd_callgraph_analyze_expr (tree *, int *, tree);
00091
00092
00093
00094 extern int lhd_gimplify_expr (tree *, tree *, tree *);
00095 extern enum omp_clause_default_kind lhd_omp_predetermined_sharing (tree);
00096 extern tree lhd_omp_assignment (tree, tree, tree);
00097 struct gimplify_omp_ctx;
00098 extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
00099 tree);
00100
00101 #define LANG_HOOKS_NAME "GNU unknown"
00102 #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
00103 #define LANG_HOOKS_INIT hook_bool_void_false
00104 #define LANG_HOOKS_FINISH lhd_do_nothing
00105 #define LANG_HOOKS_PARSE_FILE lhd_do_nothing_i
00106 #define LANG_HOOKS_CLEAR_BINDING_STACK lhd_do_nothing
00107 #define LANG_HOOKS_INIT_OPTIONS hook_uint_uint_constcharptrptr_0
00108 #define LANG_HOOKS_INITIALIZE_DIAGNOSTICS lhd_initialize_diagnostics
00109 #define LANG_HOOKS_HANDLE_OPTION hook_int_size_t_constcharptr_int_0
00110 #define LANG_HOOKS_MISSING_ARGUMENT hook_bool_constcharptr_size_t_false
00111 #define LANG_HOOKS_POST_OPTIONS lhd_post_options
00112 #define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
00113 #define LANG_HOOKS_EXPAND_CONSTANT lhd_return_tree
00114 #define LANG_HOOKS_EXPAND_EXPR lhd_expand_expr
00115 #define LANG_HOOKS_EXPAND_DECL lhd_expand_decl
00116 #define LANG_HOOKS_SAFE_FROM_P lhd_safe_from_p
00117 #define LANG_HOOKS_FINISH_INCOMPLETE_DECL lhd_do_nothing_t
00118 #define LANG_HOOKS_STATICP lhd_staticp
00119 #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
00120 #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name
00121 #define LANG_HOOKS_CAN_USE_BIT_FIELDS_P lhd_can_use_bit_fields_p
00122 #define LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS false
00123 #define LANG_HOOKS_NO_BODY_BLOCKS false
00124 #define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
00125 #define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
00126 #define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing
00127 #define LANG_HOOKS_PRINT_TYPE lhd_print_tree_nothing
00128 #define LANG_HOOKS_PRINT_IDENTIFIER lhd_print_tree_nothing
00129 #define LANG_HOOKS_PRINT_ERROR_FUNCTION lhd_print_error_function
00130 #define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name
00131 #define LANG_HOOKS_DWARF_NAME lhd_dwarf_name
00132 #define LANG_HOOKS_GET_CALLEE_FNDECL lhd_return_null_tree
00133 #define LANG_HOOKS_EXPR_SIZE lhd_expr_size
00134 #define LANG_HOOKS_TREE_SIZE lhd_tree_size
00135 #define LANG_HOOKS_TYPES_COMPATIBLE_P lhd_types_compatible_p
00136 #define LANG_HOOKS_BUILTIN_FUNCTION builtin_function
00137 #define LANG_HOOKS_EXPR_TO_DECL lhd_expr_to_decl
00138 #define LANG_HOOKS_TO_TARGET_CHARSET lhd_to_target_charset
00139 #define LANG_HOOKS_INIT_TS lhd_do_nothing
00140
00141 #define LANG_HOOKS_FUNCTION_INIT lhd_do_nothing_f
00142 #define LANG_HOOKS_FUNCTION_FINAL lhd_do_nothing_f
00143 #define LANG_HOOKS_FUNCTION_ENTER_NESTED lhd_do_nothing_f
00144 #define LANG_HOOKS_FUNCTION_LEAVE_NESTED lhd_do_nothing_f
00145 #define LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P hook_bool_tree_true
00146
00147
00148 #define LANG_HOOKS_ATTRIBUTE_TABLE NULL
00149 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE NULL
00150 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE NULL
00151
00152
00153 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES lhd_tree_inlining_walk_subtrees
00154 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
00155 lhd_tree_inlining_cannot_inline_tree_fn
00156 #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
00157 lhd_tree_inlining_disregard_inline_limits
00158 #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \
00159 lhd_tree_inlining_add_pending_fn_decls
00160 #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \
00161 lhd_tree_inlining_auto_var_in_fn_p
00162 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
00163 lhd_tree_inlining_anon_aggr_type_p
00164 #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P \
00165 hook_bool_tree_tree_false
00166 #define LANG_HOOKS_TREE_INLINING_START_INLINING \
00167 lhd_tree_inlining_start_inlining
00168 #define LANG_HOOKS_TREE_INLINING_END_INLINING \
00169 lhd_tree_inlining_end_inlining
00170 #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
00171 lhd_tree_inlining_convert_parm_for_inlining
00172
00173 #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \
00174 LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \
00175 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, \
00176 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, \
00177 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, \
00178 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, \
00179 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, \
00180 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P, \
00181 LANG_HOOKS_TREE_INLINING_START_INLINING, \
00182 LANG_HOOKS_TREE_INLINING_END_INLINING, \
00183 LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
00184 }
00185
00186 #define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR lhd_callgraph_analyze_expr
00187 #define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION NULL
00188
00189 #define LANG_HOOKS_CALLGRAPH_INITIALIZER { \
00190 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR, \
00191 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, \
00192 }
00193
00194 #define LANG_HOOKS_FUNCTION_INITIALIZER { \
00195 LANG_HOOKS_FUNCTION_INIT, \
00196 LANG_HOOKS_FUNCTION_FINAL, \
00197 LANG_HOOKS_FUNCTION_ENTER_NESTED, \
00198 LANG_HOOKS_FUNCTION_LEAVE_NESTED, \
00199 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P \
00200 }
00201
00202
00203 #define LANG_HOOKS_GIMPLIFY_EXPR lhd_gimplify_expr
00204 #define LANG_HOOKS_FOLD_OBJ_TYPE_REF NULL
00205
00206
00207 extern bool lhd_tree_dump_dump_tree (void *, tree);
00208 extern int lhd_tree_dump_type_quals (tree);
00209 extern tree lhd_make_node (enum tree_code);
00210
00211 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN lhd_tree_dump_dump_tree
00212 #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN lhd_tree_dump_type_quals
00213
00214 #define LANG_HOOKS_TREE_DUMP_INITIALIZER { \
00215 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, \
00216 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN \
00217 }
00218
00219
00220
00221 #define LANG_HOOKS_MAKE_TYPE lhd_make_node
00222 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
00223 #define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
00224 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
00225 #define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
00226 #define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \
00227 lhd_omp_firstprivatize_type_sizes
00228 #define LANG_HOOKS_HASH_TYPES true
00229
00230 #define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
00231 LANG_HOOKS_MAKE_TYPE, \
00232 LANG_HOOKS_TYPE_FOR_MODE, \
00233 LANG_HOOKS_TYPE_FOR_SIZE, \
00234 LANG_HOOKS_UNSIGNED_TYPE, \
00235 LANG_HOOKS_SIGNED_TYPE, \
00236 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, \
00237 LANG_HOOKS_TYPE_PROMOTES_TO, \
00238 LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
00239 LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
00240 LANG_HOOKS_TYPE_MAX_SIZE, \
00241 LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES, \
00242 LANG_HOOKS_HASH_TYPES \
00243 }
00244
00245
00246 #define LANG_HOOKS_GLOBAL_BINDINGS_P global_bindings_p
00247 #define LANG_HOOKS_INSERT_BLOCK insert_block
00248 #define LANG_HOOKS_PUSHDECL pushdecl
00249 #define LANG_HOOKS_GETDECLS getdecls
00250 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl
00251 #define LANG_HOOKS_WRITE_GLOBALS write_global_declarations
00252 #define LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE NULL
00253 #define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall
00254 #define LANG_HOOKS_COMDAT_GROUP lhd_comdat_group
00255 #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE hook_bool_tree_false
00256 #define LANG_HOOKS_OMP_PREDETERMINED_SHARING lhd_omp_predetermined_sharing
00257 #define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR hook_bool_tree_bool_false
00258 #define LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE hook_bool_tree_bool_false
00259 #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR hook_tree_tree_tree_null
00260 #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR lhd_omp_assignment
00261 #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP lhd_omp_assignment
00262 #define LANG_HOOKS_OMP_CLAUSE_DTOR hook_tree_tree_tree_null
00263
00264 #define LANG_HOOKS_DECLS { \
00265 LANG_HOOKS_GLOBAL_BINDINGS_P, \
00266 LANG_HOOKS_INSERT_BLOCK, \
00267 LANG_HOOKS_PUSHDECL, \
00268 LANG_HOOKS_GETDECLS, \
00269 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \
00270 LANG_HOOKS_WRITE_GLOBALS, \
00271 LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE, \
00272 LANG_HOOKS_DECL_OK_FOR_SIBCALL, \
00273 LANG_HOOKS_COMDAT_GROUP, \
00274 LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE, \
00275 LANG_HOOKS_OMP_PREDETERMINED_SHARING, \
00276 LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR, \
00277 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE, \
00278 LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR, \
00279 LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, \
00280 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, \
00281 LANG_HOOKS_OMP_CLAUSE_DTOR \
00282 }
00283
00284 #ifdef KEY
00285 #define LANG_HOOKS_CPLUS_EXPAND_CONSTANT NULL
00286 #define LANG_HOOKS_MANGLE_DECL NULL
00287 #define LANG_HOOKS_CP_GENERICIZE NULL
00288 #define LANG_HOOKS_SIMPLIFY_AGGR_INIT_EXPRS_R NULL
00289 #endif
00290
00291
00292 #define LANG_HOOKS_INITIALIZER { \
00293 LANG_HOOKS_NAME, \
00294 LANG_HOOKS_IDENTIFIER_SIZE, \
00295 LANG_HOOKS_TREE_SIZE, \
00296 LANG_HOOKS_INIT_OPTIONS, \
00297 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, \
00298 LANG_HOOKS_HANDLE_OPTION, \
00299 LANG_HOOKS_MISSING_ARGUMENT, \
00300 LANG_HOOKS_POST_OPTIONS, \
00301 LANG_HOOKS_INIT, \
00302 LANG_HOOKS_FINISH, \
00303 LANG_HOOKS_PARSE_FILE, \
00304 LANG_HOOKS_CLEAR_BINDING_STACK, \
00305 LANG_HOOKS_GET_ALIAS_SET, \
00306 LANG_HOOKS_EXPAND_CONSTANT, \
00307 LANG_HOOKS_EXPAND_EXPR, \
00308 LANG_HOOKS_EXPAND_DECL, \
00309 LANG_HOOKS_SAFE_FROM_P, \
00310 LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
00311 LANG_HOOKS_MARK_ADDRESSABLE, \
00312 LANG_HOOKS_STATICP, \
00313 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
00314 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \
00315 LANG_HOOKS_CAN_USE_BIT_FIELDS_P, \
00316 LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS, \
00317 LANG_HOOKS_NO_BODY_BLOCKS, \
00318 LANG_HOOKS_PRINT_STATISTICS, \
00319 LANG_HOOKS_PRINT_XNODE, \
00320 LANG_HOOKS_PRINT_DECL, \
00321 LANG_HOOKS_PRINT_TYPE, \
00322 LANG_HOOKS_PRINT_IDENTIFIER, \
00323 LANG_HOOKS_DECL_PRINTABLE_NAME, \
00324 LANG_HOOKS_DWARF_NAME, \
00325 LANG_HOOKS_TYPES_COMPATIBLE_P, \
00326 LANG_HOOKS_GET_CALLEE_FNDECL, \
00327 LANG_HOOKS_PRINT_ERROR_FUNCTION, \
00328 LANG_HOOKS_EXPR_SIZE, \
00329 LANG_HOOKS_TO_TARGET_CHARSET, \
00330 LANG_HOOKS_ATTRIBUTE_TABLE, \
00331 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, \
00332 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, \
00333 LANG_HOOKS_FUNCTION_INITIALIZER, \
00334 LANG_HOOKS_TREE_INLINING_INITIALIZER, \
00335 LANG_HOOKS_CALLGRAPH_INITIALIZER, \
00336 LANG_HOOKS_TREE_DUMP_INITIALIZER, \
00337 LANG_HOOKS_DECLS, \
00338 LANG_HOOKS_FOR_TYPES_INITIALIZER, \
00339 LANG_HOOKS_GIMPLIFY_EXPR, \
00340 LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
00341 LANG_HOOKS_BUILTIN_FUNCTION, \
00342 LANG_HOOKS_INIT_TS, \
00343 LANG_HOOKS_EXPR_TO_DECL, \
00344 LANG_HOOKS_CPLUS_EXPAND_CONSTANT, \
00345 LANG_HOOKS_MANGLE_DECL, \
00346 LANG_HOOKS_CP_GENERICIZE, \
00347 LANG_HOOKS_SIMPLIFY_AGGR_INIT_EXPRS_R, \
00348 }
00349
00350 #endif