fixed some depencies between irdump.c and irdumptxt.c
[libfirm] / ir / tr / tpop_t.h
index 4d51cf0..a24b5d7 100644 (file)
@@ -48,6 +48,11 @@ struct tp_op {
  */
 tp_op *new_tpop (tp_opcode code, ident *name, size_t attr_size);
 
+/**
+ * Free a tpop datastructure.
+ */
+void free_tpop(tp_op* tpop);
+
 /**
  *   Initialize the tpop module.
  *
@@ -59,6 +64,13 @@ tp_op *new_tpop (tp_opcode code, ident *name, size_t attr_size);
  */
 void init_tpop (void);
 
+/**
+ *  Finalize the topo module.
+ *
+ *  Frees all type opcodes.
+ */
+void finish_tpop(void);
+
 /**
  *   Returns the size of the attribute to this kind
  *   of type.
@@ -71,4 +83,28 @@ void init_tpop (void);
  */
 int get_tpop_attr_size (tp_op *op);
 
+
+/* ---------------- *
+ * inline functions *
+ * -----------------*/
+
+static INLINE tp_opcode
+__get_tpop_code(tp_op *op) {
+  return op->code;
+}
+
+static INLINE ident *
+__get_tpop_ident(tp_op *op){
+  return op->name;
+}
+
+static INLINE int
+__get_tpop_attr_size(tp_op *op) {
+  return op->attr_size;
+}
+
+#define get_tpop_code(op)      __get_tpop_code(op)
+#define get_tpop_ident(op)     __get_tpop_ident(op)
+#define get_tpop_attr_size(op) __get_tpop_attr_size(op)
+
 #endif /* _TPOP_T_H_ */