X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firvrfy_t.h;h=c9ff7c15b0701a3632eb2a362bdf3188c65d64fa;hb=c1212ac51039d2f4c39bb8939a036f2f18c72e7c;hp=e3531f6bdf0b0bcba5a804c8be652ef34d58837d;hpb=a9721d45253ba687b0d2583615c6a7859b217450;p=libfirm diff --git a/ir/ir/irvrfy_t.h b/ir/ir/irvrfy_t.h index e3531f6bd..c9ff7c15b 100644 --- a/ir/ir/irvrfy_t.h +++ b/ir/ir/irvrfy_t.h @@ -1,21 +1,35 @@ /* - * Project: libFIRM - * File name: ir/ir/irvrfy_t.h - * Purpose: New checker of irnodes for correctness. - * Author: Michael Beck - * Modified by: - * Created: - * CVS-ID: $Id$ - * Copyright: (c) 1998-2005 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ -#ifndef _IRVRFY_T_H_ -#define _IRVRFY_T_H_ +/** + * @file + * @brief New checker of irnodes for correctness. + * @author Michael Beck + * @version $Id$ + */ +#ifndef FIRM_IR_IRVRFY_T_H +#define FIRM_IR_IRVRFY_T_H + +#include "irflag_t.h" #include "irvrfy.h" #include "irdump.h" -extern node_verification_t opt_do_node_verification; extern const char *firm_vrfy_failure_msg; #ifdef NDEBUG @@ -23,22 +37,22 @@ extern const char *firm_vrfy_failure_msg; * in RELEASE mode, returns ret if the expression expr evaluates to zero * in ASSERT mode, asserts the expression expr (and the string string). */ -#define ASSERT_AND_RET(expr, string, ret) if (!(expr)) return (ret) +#define ASSERT_AND_RET(expr, string, ret) do { if (!(expr)) return (ret); } while (0) /* * in RELEASE mode, returns ret if the expression expr evaluates to zero * in ASSERT mode, executes blk if the expression expr evaluates to zero and asserts expr */ -#define ASSERT_AND_RET_DBG(expr, string, ret, blk) if (!(expr)) return (ret) +#define ASSERT_AND_RET_DBG(expr, string, ret, blk) do { if (!(expr)) return (ret); } while (0) #else #define ASSERT_AND_RET(expr, string, ret) \ do { \ - if (opt_do_node_verification == NODE_VERIFICATION_ON) {\ + if (opt_do_node_verification == FIRM_VERIFICATION_ON) {\ if (!(expr) && current_ir_graph != get_const_code_irg()) \ - dump_ir_block_graph(current_ir_graph, "-assert"); \ + dump_ir_block_graph_sched(current_ir_graph, "-assert"); \ assert((expr) && string); } \ if (!(expr)) { \ - if (opt_do_node_verification == NODE_VERIFICATION_REPORT) \ + if (opt_do_node_verification == FIRM_VERIFICATION_REPORT) \ fprintf(stderr, #expr " : " string "\n"); \ firm_vrfy_failure_msg = #expr " && " string; \ return (ret); \ @@ -49,12 +63,12 @@ do { \ do { \ if (!(expr)) { \ firm_vrfy_failure_msg = #expr " && " string; \ - if (opt_do_node_verification != NODE_VERIFICATION_ERROR_ONLY) { blk; } \ - if (opt_do_node_verification == NODE_VERIFICATION_REPORT) \ + if (opt_do_node_verification != FIRM_VERIFICATION_ERROR_ONLY) { blk; } \ + if (opt_do_node_verification == FIRM_VERIFICATION_REPORT) \ fprintf(stderr, #expr " : " string "\n"); \ - else if (opt_do_node_verification == NODE_VERIFICATION_ON) { \ + else if (opt_do_node_verification == FIRM_VERIFICATION_ON) { \ if (!(expr) && current_ir_graph != get_const_code_irg()) \ - dump_ir_block_graph(current_ir_graph, "-assert"); \ + dump_ir_block_graph_sched(current_ir_graph, "-assert"); \ assert((expr) && string); \ } \ return (ret); \ @@ -66,6 +80,6 @@ do { \ /** * Set the default verify_node and verify_proj_node operation for an ir_op_ops. */ -void firm_set_default_verifyer(opcode code, ir_op_ops *ops); +void firm_set_default_verifyer(ir_opcode code, ir_op_ops *ops); -#endif /* _IRVRFY_T_H_ */ +#endif