HOOK_BACKEND added
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 3 Apr 2006 13:41:38 +0000 (13:41 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 3 Apr 2006 13:41:38 +0000 (13:41 +0000)
renamed init_hooks() into firm_init_hooks()

[r7569]

ir/ir/irhooks.c
ir/ir/irhooks.h

index db98c0c..6349aa0 100644 (file)
@@ -29,7 +29,7 @@ hook_entry_t *hooks[hook_last];
 
 /* 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;
 
@@ -63,6 +63,9 @@ void unregister_hook(hook_type_t hook, hook_entry_t *entry) {}
 
 #endif /* FIRM_ENABLE_HOOKS */
 
-int init_hooks(void) {
+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;
 }
index 9ec788c..d0a1c17 100644 (file)
@@ -54,6 +54,7 @@ typedef enum {
   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;
 
@@ -276,6 +277,6 @@ extern hook_entry_t *hooks[hook_last];
 #define hook_new_type(tp)                 hook_exec(hook_new_type, (ctx, tp))
 
 /* the initializer, move to hooks_t.h some day */
-int init_hooks(void);
+int firm_init_hooks(void);
 
 #endif /* __IRHOOKS_H__ */