Commit b6a361cf authored by Matthias Braun's avatar Matthias Braun
Browse files

irverify: simplify/refactor internal interfaces

parent a6d3955e
......@@ -208,7 +208,7 @@ typedef ir_entity *(*get_entity_attr_func)(const ir_node *self);
*
* @see do_node_verification()
*/
typedef int (*verify_node_func)(ir_node *self, ir_graph *irg);
typedef int (*verify_node_func)(const ir_node *node);
/**
* The verify_node operation for Proj(X).
......@@ -217,7 +217,7 @@ typedef int (*verify_node_func)(ir_node *self, ir_graph *irg);
*
* @see do_node_verification()
*/
typedef int (*verify_proj_node_func)(ir_node *self, ir_node *proj);
typedef int (*verify_proj_node_func)(const ir_node *proj);
/**
* Reasons to call the dump_node operation:
......
......@@ -35,7 +35,7 @@
*
* @return NON-zero on success
*/
FIRM_API int irn_verify(ir_node *checknode);
FIRM_API int irn_verify(const ir_node *checknode);
/**
* Tests the modes of checknode and its predecessors.
......@@ -43,14 +43,15 @@ FIRM_API int irn_verify(ir_node *checknode);
*
* @return NON-zero on success
*/
FIRM_API int irn_verify_irg(ir_node *checknode, ir_graph *irg);
FIRM_API int irn_verify_irg(const ir_node *checknode, ir_graph *irg);
/**
* Same as irn_verify_irg, but temporary sets verification mode to
* NODE_VERIFICATION_ERROR_ONLY.
* @return NON-zero on success
*/
FIRM_API int irn_verify_irg_dump(ir_node *checknode, ir_graph *irg, const char **bad_string);
FIRM_API int irn_verify_irg_dump(const ir_node *checknode, ir_graph *irg,
const char **bad_string);
/**
* Flags for irg_verify().
......
......@@ -630,7 +630,7 @@ struct obstack *
*
* Implementation is GLIBC specific as is uses the internal _obstack_chunk implementation.
*/
int node_is_in_irgs_storage(ir_graph *irg, ir_node *n)
int node_is_in_irgs_storage(const ir_graph *irg, const ir_node *n)
{
struct _obstack_chunk *p;
......
......@@ -93,7 +93,7 @@ struct obstack *get_irg_obstack(const ir_graph *irg);
* @param irg the IR graph
* @param n the IR node
*/
int node_is_in_irgs_storage(ir_graph *irg, ir_node *n);
int node_is_in_irgs_storage(const ir_graph *irg, const ir_node *n);
/*-------------------------------------------------------------------*/
/* inline functions for graphs */
......
This diff is collapsed.
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