3 * File name: ir/ir/irhooks.c
4 * Purpose: Generic hooks for various libFirm functions.
8 * Copyright: (C) 1998-2005 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
15 * Generic hooks for various libFirm functions.
17 * @author Michael Beck
25 #ifdef FIRM_ENABLE_HOOKS
28 hook_entry_t *hooks[hook_last];
31 void register_hook(hook_type_t hook, hook_entry_t *entry) {
32 if (! entry->hook._hook_turn_into_id)
35 entry->next = hooks[hook];
41 void register_hook(hook_type_t hook, hook_entry_t *entry) {}
43 #endif /* FIRM_ENABLE_HOOKS */
47 return (int)register_hook;