Remove the pointless function firm_init_hooks(). Its only purpose seems to be to...
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 19 Aug 2009 08:31:48 +0000 (08:31 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 19 Aug 2009 08:31:48 +0000 (08:31 +0000)
[r26382]

include/libfirm/irhooks.h
ir/common/firm.c
ir/ir/irhooks.c

index c08eb02..5b52e82 100644 (file)
@@ -285,7 +285,4 @@ extern hook_entry_t *hooks[hook_last];
 #define hook_new_type(tp)                 hook_exec(hook_new_type, (ctx, tp))
 #define hook_node_info(F, node)           hook_exec(hook_node_info, (ctx, F, node))
 
-/* the initializer, move to hooks_t.h some day */
-int firm_init_hooks(void);
-
 #endif
index 5c40fc9..6fb9d84 100644 (file)
@@ -93,8 +93,6 @@ void ir_init(const firm_parameter_t *param)
        firm_init_flags();
        /* initialize all ident stuff */
        init_ident(def_params.id_if, 1024);
-       /* initialize Firm hooks */
-       firm_init_hooks();
        /* enhanced statistics, need idents and hooks */
        firm_init_stat(def_params.enable_statistics);
        /* Edges need hooks. */
index 4e71869..5b51efd 100644 (file)
@@ -57,10 +57,3 @@ void unregister_hook(hook_type_t hook, hook_entry_t *entry) {
     entry->next = NULL;
   }
 }
-
-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;
-}