X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fopt_confirms.h;h=40c8914579cfbebc59ae5b03ca3cfac328651938;hb=9d3c8631459f431c313160dab5778e8a7b88dd92;hp=6ca163eb51b429a81d7ac2f6baca7c0858374007;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/opt/opt_confirms.h b/ir/opt/opt_confirms.h index 6ca163eb5..40c891457 100644 --- a/ir/opt/opt_confirms.h +++ b/ir/opt/opt_confirms.h @@ -32,6 +32,9 @@ #include "firm_types.h" +/** Needed for MSVC to suporess warnings because it doest NOT handle const right. */ +typedef const ir_node *ir_node_cnst_ptr; + /** * Check, if the value of a node is != 0. * @@ -42,7 +45,7 @@ * @param confirm if n is confirmed to be != 0, returns * the the Confirm-node, else NULL */ -int value_not_zero(ir_node *n, ir_node **confirm); +int value_not_zero(const ir_node *n, ir_node_cnst_ptr *confirm); /** * Check, if the value of a node cannot represent a NULL pointer. @@ -57,12 +60,12 @@ int value_not_zero(ir_node *n, ir_node **confirm); * @param confirm if n is confirmed to be != NULL, returns * the the Confirm-node, else NULL */ -int value_not_null(ir_node *n, ir_node **confirm); +int value_not_null(const ir_node *n, ir_node_cnst_ptr *confirm); /** * Possible return values of value_classify(). */ -typedef enum _value_classify_sign { +typedef enum value_classify_sign { value_classified_unknown = 0, /**< could not classify */ value_classified_positive = 1, /**< value is positive, i.e. >= 0 */ value_classified_negative = -1 /**< value is negative, i.e. <= 0 if @@ -87,6 +90,6 @@ value_classify_sign classify_value_sign(ir_node *n); * @param right the right operand of the Cmp * @param pnc the compare relation */ -tarval *computed_value_Cmp_Confirm(ir_node *cmp, ir_node *left, ir_node *right, pn_Cmp pnc); +ir_tarval *computed_value_Cmp_Confirm(ir_node *cmp, ir_node *left, ir_node *right, pn_Cmp pnc); #endif /* FIRM_OPT_CONFIRMS_H */