renamed all type * to ir_type *
[libfirm] / ir / ir / irhooks.h
index 235fdca..f85bbfc 100644 (file)
@@ -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);