renamed init_hooks() into firm_init_hooks()
[r7569]
/* register a hook */
void register_hook(hook_type_t hook, hook_entry_t *entry) {
/* register a hook */
void register_hook(hook_type_t hook, hook_entry_t *entry) {
- /* check if a hook function is specifyed. It's a union, so no matter which one */
+ /* check if a hook function is specified. It's a union, so no matter which one */
if (! entry->hook._hook_turn_into_id)
return;
if (! entry->hook._hook_turn_into_id)
return;
#endif /* FIRM_ENABLE_HOOKS */
#endif /* FIRM_ENABLE_HOOKS */
+int firm_init_hooks(void) {
+ /* this strange code assures that both functions are available
+ in a shared library even if none of them is called.
+ Meanwhile not needed anymore but ... */
return (int)register_hook + (int)unregister_hook;
}
return (int)register_hook + (int)unregister_hook;
}
HOOK_OPT_CONFIRM_E, /**< a value was evaluated due to a Confirm */
HOOK_OPT_EXC_REM, /**< a exception edge was removed due to a Confirmation prove */
HOOK_LOWERED, /**< lowered */
HOOK_OPT_CONFIRM_E, /**< a value was evaluated due to a Confirm */
HOOK_OPT_EXC_REM, /**< a exception edge was removed due to a Confirmation prove */
HOOK_LOWERED, /**< lowered */
+ HOOK_BACKEND, /**< a backend transformation */
HOOK_OPT_LAST
} hook_opt_kind;
HOOK_OPT_LAST
} hook_opt_kind;
#define hook_new_type(tp) hook_exec(hook_new_type, (ctx, tp))
/* the initializer, move to hooks_t.h some day */
#define hook_new_type(tp) hook_exec(hook_new_type, (ctx, tp))
/* the initializer, move to hooks_t.h some day */
+int firm_init_hooks(void);
#endif /* __IRHOOKS_H__ */
#endif /* __IRHOOKS_H__ */