Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
1ed2e892
Commit
1ed2e892
authored
Feb 13, 2014
by
Christoph Mallon
Browse files
Use the opaque pointer type hook_entry_t* instead of void*.
parent
e4190f10
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/libfirm/firm_types.h
View file @
1ed2e892
...
...
@@ -316,6 +316,8 @@ typedef enum {
align_non_aligned
,
/**< The entity is not aligned. */
}
ir_align
;
typedef
struct
hook_entry
hook_entry_t
;
#include
"end.h"
#endif
include/libfirm/irdump.h
View file @
1ed2e892
...
...
@@ -369,7 +369,7 @@ typedef void (dump_node_info_cb_t)(void *data, FILE *out, const ir_node *n);
*
* @note This functionality is only available, if Firm hooks are enabled.
*/
FIRM_API
void
*
dump_add_node_info_callback
(
dump_node_info_cb_t
*
cb
,
void
*
data
);
FIRM_API
hook_entry_t
*
dump_add_node_info_callback
(
dump_node_info_cb_t
*
cb
,
void
*
data
);
/**
* Remove a previously added info dumper callback.
...
...
@@ -377,7 +377,7 @@ FIRM_API void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data);
* @param handle the callback handle returned from
* dump_add_node_info_callback()
*/
FIRM_API
void
dump_remove_node_info_callback
(
void
*
handle
);
FIRM_API
void
dump_remove_node_info_callback
(
hook_entry_t
*
handle
);
/*@}*/
...
...
ir/ana/heights.c
View file @
1ed2e892
...
...
@@ -25,7 +25,7 @@
struct
ir_heights_t
{
ir_nodemap
data
;
unsigned
visited
;
void
*
dump_handle
;
hook_entry_t
*
dump_handle
;
struct
obstack
obst
;
};
...
...
ir/ir/irdump.c
View file @
1ed2e892
...
...
@@ -953,7 +953,7 @@ static void dump_node_vcgattr(FILE *F, const ir_node *node, const ir_node *local
}
}
void
*
dump_add_node_info_callback
(
dump_node_info_cb_t
*
cb
,
void
*
data
)
hook_entry_t
*
dump_add_node_info_callback
(
dump_node_info_cb_t
*
cb
,
void
*
data
)
{
hook_entry_t
*
info
=
XMALLOCZ
(
hook_entry_t
);
...
...
@@ -964,7 +964,7 @@ void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data)
return
info
;
}
void
dump_remove_node_info_callback
(
void
*
handle
)
void
dump_remove_node_info_callback
(
hook_entry_t
*
handle
)
{
hook_entry_t
*
info
=
(
hook_entry_t
*
)
handle
;
unregister_hook
(
hook_node_info
,
info
);
...
...
ir/ir/irhooks.h
View file @
1ed2e892
...
...
@@ -68,7 +68,7 @@ typedef void (generic_func)(void);
/**
* a hook entry
*/
typedef
struct
hook_entry
{
struct
hook_entry
{
/** A union of all possible hook types. */
union
{
/** This hook is called, after a new ir_op was created. */
...
...
@@ -161,7 +161,7 @@ typedef struct hook_entry {
/** needed for chaining */
struct
hook_entry
*
next
;
}
hook_entry_t
;
};
/**
* possible hooks
...
...
ir/ir/irprofile.c
View file @
1ed2e892
...
...
@@ -44,7 +44,7 @@ typedef struct block_assoc_t {
static
set
*
profile
=
NULL
;
/* Hook for vcg output. */
static
void
*
hook
;
static
hook_entry_t
*
hook
;
/* The debug module handle. */
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment