properly mark symbols in the public API to be exported. This allows us to use -fvisib...
[libfirm] / include / libfirm / irtypeinfo.h
index b9f2823..2db2257 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -23,7 +23,7 @@
  * @author   Goetz Lindenmaier
  * @date     28.8.2003
  * @version  $Id$
- * @summary
+ * @brief
  *   Data structure to hold type information for nodes.
  *
  *   This module defines a field "type" of type "type *" for each ir node.
@@ -34,6 +34,7 @@
 #define FIRM_ANA_IRTYPEINFO_H
 
 #include "firm_types.h"
+#include "begin.h"
 
 /* ------------ Auxiliary type. --------------------------------------- */
 
@@ -43,7 +44,7 @@
  *  variable is initialized by init_irtypeinfo().  The type is freed by
  *  free_irtypeinfo().
  */
-extern ir_type *initial_type;
+FIRM_DLL ir_type *initial_type;
 
 
 
@@ -54,31 +55,24 @@ extern ir_type *initial_type;
  *  Initializes the type information module.
  *  Generates a type inititial_type and sets the type of all nodes to this type.
  *  Calling set/get_irn_typeinfo_type() is invalid before calling init. Requires memory
- *  in the order of MIN(<calls to set_irn_typeinfo_type>, #irnodes).
+ *  in the order of MIN(\<calls to set_irn_typeinfo_type\>, \#irnodes).
  */
-void init_irtypeinfo(void);
-void free_irtypeinfo(void);
+FIRM_DLL void init_irtypeinfo(void);
+FIRM_DLL void free_irtypeinfo(void);
 
 /* ------------ Irgraph state handling. ------------------------------- */
 
-/*
-#define irg_typeinfo_none         ir_typeinfo_none
-#define irg_typeinfo_consistent   ir_typeinfo_consistent
-#define irg_typeinfo_inconsistent ir_typeinfo_inconsistent
-#define irg_typeinfo_state        ir_typeinfo_state
-*/
-
 typedef enum {
-  ir_typeinfo_none,         /**< No typeinfo computed, calls to set/get_irn_typeinfo_type()
-                                 are invalid. */
-  ir_typeinfo_consistent,   /**< Type info valid, calls to set/get_irn_typeinfo_type() return
-                                 the proper type. */
-  ir_typeinfo_inconsistent  /**< Type info can be accessed, but it can be invalid
-                                 because of other transformations. */
+       ir_typeinfo_none,        /**< No typeinfo computed, calls to set/get_irn_typeinfo_type()
+                                     are invalid. */
+       ir_typeinfo_consistent,  /**< Type info valid, calls to set/get_irn_typeinfo_type() return
+                                     the proper type. */
+       ir_typeinfo_inconsistent /**< Type info can be accessed, but it can be invalid
+                                     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(ir_graph *irg);
+FIRM_DLL void set_irg_typeinfo_state(ir_graph *irg, ir_typeinfo_state s);
+FIRM_DLL ir_typeinfo_state get_irg_typeinfo_state(const ir_graph *irg);
 
 /** Returns accumulated type information state information.
  *
@@ -86,10 +80,10 @@ ir_typeinfo_state get_irg_typeinfo_state(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);
+FIRM_DLL ir_typeinfo_state get_irp_typeinfo_state(void);
+FIRM_DLL void              set_irp_typeinfo_state(ir_typeinfo_state s);
 /** If typeinfo is consistent, sets it to inconsistent. */
-void              set_irp_typeinfo_inconsistent(void);
+FIRM_DLL void              set_irp_typeinfo_inconsistent(void);
 
 /* ------------ Irnode type information. ------------------------------ */
 
@@ -99,7 +93,9 @@ void              set_irp_typeinfo_inconsistent(void);
  * ir_typeinfo_consistent or ir_typeinfo_inconsistent.  They
  * assume current_ir_graph set properly.
  */
-ir_type *get_irn_typeinfo_type(ir_node *n);
-void    set_irn_typeinfo_type(ir_node *n, ir_type *tp);
+FIRM_DLL ir_type *get_irn_typeinfo_type(const ir_node *n);
+FIRM_DLL void     set_irn_typeinfo_type(ir_node *n, ir_type *tp);
+
+#include "end.h"
 
 #endif