X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firbitset.h;h=89a7412842c348632b68a962b6157dee90226182;hb=cd05b35df4f0a2af7c4edc94e37f973843e9a547;hp=5893b13b5c46257348437084cdeb0deec9e976af;hpb=50d5db648a1a8ae3326b004ef4741bbfec8e9750;p=libfirm diff --git a/ir/ir/irbitset.h b/ir/ir/irbitset.h index 5893b13b5..89a741284 100644 --- a/ir/ir/irbitset.h +++ b/ir/ir/irbitset.h @@ -1,11 +1,31 @@ -/** - * Some convenience macros for node bitmaps. - * @author Sebastian Hack - * @date 10.05.2006 +/* + * 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 __FIRM_IRBITSET_H -#define __FIRM_IRBITSET_H +/** + * @file + * @brief Some convenience macros for node bitmaps. + * @author Sebastian Hack + * @date 10.05.2006 + * @version $Id$ + */ +#ifndef FIRM_IR_IRBITSET_H +#define FIRM_IR_IRBITSET_H #include "bitset.h" @@ -18,7 +38,7 @@ /* Internal use. */ -#define _bsfe_get_irn(irg, elm) (elm == -1 ? NULL : get_idx_irn((irg), (unsigned) elm)) +#define _bsfe_get_irn(irg, elm) (elm == (bitset_pos_t) -1 ? NULL : get_idx_irn((irg), (unsigned) elm)) /** * Iterate over a bitset containing node indexes. @@ -28,7 +48,7 @@ * @param irn An ir_node * which is set to the current node. */ #define bitset_foreach_irn(irg, bs, elm, irn) \ - for(elm = bitset_next_set(bs, 0), irn = _bsfe_get_irn(irg, elm); elm != -1; elm = bitset_next_set(bs, elm + 1), irn = _bsfe_get_irn(irg, elm)) + for(elm = bitset_next_set(bs, 0), irn = _bsfe_get_irn(irg, elm); elm != (bitset_pos_t) -1; elm = bitset_next_set(bs, elm + 1), irn = _bsfe_get_irn(irg, elm)) -#endif /* __FIRM_IRBITSET_H */ +#endif