X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firtypeinfo.h;h=d0fe4f1b15b94af882acca8e5ebd774cbe531619;hb=e5c8ad12dba958fd212704917d7a433e6716462b;hp=60941f9cd5fcf2215d9e8532549b5bd9e3ac55c8;hpb=acbdf295cc01d5b69b1cb8ea2c7764dca1e7b8ac;p=libfirm diff --git a/include/libfirm/irtypeinfo.h b/include/libfirm/irtypeinfo.h index 60941f9cd..d0fe4f1b1 100644 --- a/include/libfirm/irtypeinfo.h +++ b/include/libfirm/irtypeinfo.h @@ -1,20 +1,6 @@ /* - * Copyright (C) 1995-2008 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. + * Copyright (C) 2012 University of Karlsruhe. */ /** @@ -22,7 +8,6 @@ * @brief Data structure to hold type information for nodes. * @author Goetz Lindenmaier * @date 28.8.2003 - * @version $Id$ * @brief * Data structure to hold type information for nodes. * @@ -34,6 +19,7 @@ #define FIRM_ANA_IRTYPEINFO_H #include "firm_types.h" +#include "begin.h" /* ------------ Auxiliary type. --------------------------------------- */ @@ -43,7 +29,7 @@ * variable is initialized by init_irtypeinfo(). The type is freed by * free_irtypeinfo(). */ -extern ir_type *initial_type; +FIRM_API ir_type *initial_type; @@ -56,11 +42,13 @@ extern ir_type *initial_type; * Calling set/get_irn_typeinfo_type() is invalid before calling init. Requires memory * in the order of MIN(\, \#irnodes). */ -void init_irtypeinfo(void); -void free_irtypeinfo(void); +FIRM_API void init_irtypeinfo(void); +/** Frees memory used by the type information module */ +FIRM_API void free_irtypeinfo(void); /* ------------ Irgraph state handling. ------------------------------- */ +/** typeinfo information state */ typedef enum { ir_typeinfo_none, /**< No typeinfo computed, calls to set/get_irn_typeinfo_type() are invalid. */ @@ -70,8 +58,10 @@ typedef enum { because of other transformations. */ } ir_typeinfo_state; -void set_irg_typeinfo_state(ir_graph *irg, ir_typeinfo_state s); -ir_typeinfo_state get_irg_typeinfo_state(const ir_graph *irg); +/** Sets state of typeinfo information in graph @p irg to @p state. */ +FIRM_API void set_irg_typeinfo_state(ir_graph *irg, ir_typeinfo_state state); +/** Returns state of typeinfo information in graph @p irg. */ +FIRM_API ir_typeinfo_state get_irg_typeinfo_state(const ir_graph *irg); /** Returns accumulated type information state information. * @@ -79,20 +69,23 @@ ir_typeinfo_state get_irg_typeinfo_state(const ir_graph *irg); * consistent. Returns ir_typeinfo_inconsistent if at least one irg has inconsistent * or no type information. Returns ir_typeinfo_none if no irg contains type information. */ -ir_typeinfo_state get_irp_typeinfo_state(void); -void set_irp_typeinfo_state(ir_typeinfo_state s); -/** If typeinfo is consistent, sets it to inconsistent. */ -void set_irp_typeinfo_inconsistent(void); +FIRM_API ir_typeinfo_state get_irp_typeinfo_state(void); +/** Sets state of typeinfo information for the current program to @p state */ +FIRM_API void set_irp_typeinfo_state(ir_typeinfo_state state); +/** Sets state of typeinfo information for the current program to #ir_typeinfo_inconsistent */ +FIRM_API void set_irp_typeinfo_inconsistent(void); /* ------------ Irnode type information. ------------------------------ */ /** Accessing the type information. * * These routines only work properly if the ir_graph is in state - * ir_typeinfo_consistent or ir_typeinfo_inconsistent. They - * assume current_ir_graph set properly. + * ir_typeinfo_consistent or ir_typeinfo_inconsistent. */ -ir_type *get_irn_typeinfo_type(const ir_node *n); -void set_irn_typeinfo_type(ir_node *n, ir_type *tp); +FIRM_API ir_type *get_irn_typeinfo_type(const ir_node *n); +/** Sets type information of procedure graph node @p node to type @p type. */ +FIRM_API void set_irn_typeinfo_type(ir_node *node, ir_type *type); + +#include "end.h" #endif