Commit 0c7ff0d2 authored by Matthias Braun's avatar Matthias Braun
Browse files

make verify_new_node function public

parent e0af7e22
......@@ -730,6 +730,13 @@ FIRM_API void irg_finalize_cons(ir_graph *irg);
* e.g., that no more subtypes will be added. */
FIRM_API void irp_finalize_cons(void);
/**
* If firm is built in debug mode, verify that a newly created node is fine.
* The normal node constructors already call this function, you only need to
* call this yourself if you create new node constructors on your own.
*/
FIRM_API void verify_new_node(ir_graph *irg, ir_node *node);
/**
* Register a new callback for the case that the value of an uninitialized
* variable is requested.
......
......@@ -642,3 +642,8 @@ ir_node *new_r_Block_noopt(ir_graph *irg, int arity, ir_node *in[])
verify_new_node(irg, res);
return res;
}
void (verify_new_node)(ir_graph *irg, ir_node *node)
{
verify_new_node_(irg, node);
}
......@@ -18,14 +18,15 @@
#include "irverify_t.h"
#include "compiler.h"
#define get_cur_block() _get_cur_block()
#define verify_new_node(irg, node) verify_new_node_((irg), (node))
#define get_cur_block() _get_cur_block()
static inline ir_node *_get_cur_block(void)
{
return current_ir_graph->current_block;
}
static inline void verify_new_node(ir_graph *irg, ir_node *node)
static inline void verify_new_node_(ir_graph *irg, ir_node *node)
{
#ifdef DEBUG_libfirm
if (UNLIKELY(!irn_verify_irg(node, irg)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment