From 883429c95e44cbe57fd76769898762a92933ef9c Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 24 Oct 2005 13:45:54 +0000 Subject: [PATCH] hook_new_type added [r6792] --- ir/ir/irhooks.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ir/ir/irhooks.h b/ir/ir/irhooks.h index 235fdca53..f85bbfc49 100644 --- a/ir/ir/irhooks.h +++ b/ir/ir/irhooks.h @@ -148,8 +148,11 @@ typedef struct hook_entry { /** This hook is called after a new mode was registered. */ void (*_hook_new_mode)(void *context, const ir_mode *tmpl, ir_mode *mode); - /** This hook is called after a new entity was created */ + /** This hook is called after a new entity was created. */ void (*_hook_new_entity)(void *context, entity *ent); + + /** This hook is called after a new type was created. */ + void (*_hook_new_type)(void *context, type *tp); } hook; /** the context for every hook */ @@ -187,6 +190,7 @@ typedef enum { hook_arch_dep_replace_division_by_const, hook_new_mode, hook_new_entity, + hook_new_type, hook_last } hook_type_t; @@ -261,6 +265,7 @@ extern hook_entry_t *hooks[hook_last]; hook_exec(hook_arch_dep_replace_division_by_const, (ctx, irn)) #define hook_new_mode(tmpl, mode) hook_exec(hook_new_mode, (ctx, tmpl, mode)) #define hook_new_entity(ent) hook_exec(hook_new_entity, (ctx, ent)) +#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); -- 2.20.1