-/**
- * @file irreflect.h
- * @date 9.9.2004
- * @author Sebastian Hack
- * @brief Reflection for Firm operations.
+/*
+ * 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.
*
- * $Id$
+ * 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_REFLECT_H
-#define _FIRM_REFLECT_H
+/**
+ * @file
+ * @brief Reflection for Firm operations.
+ * @author Sebastian Hack
+ * @date 9.9.2004
+ * @version $Id$
+ */
+#ifndef FIRM_IR_REFLECT_H
+#define FIRM_IR_REFLECT_H
#include <limits.h>
+#include "firm_types.h"
#include "irop.h"
-#include "irnode.h"
#define RFLCT_MC(m) rflct_ms_ ## m
typedef enum {
* @param opc The opcode.
* @return The number of signatures for this opcode.
*/
-int rflct_get_signature_count(opcode opc);
+int rflct_get_signature_count(ir_opcode opc);
/**
* Try to get the signature, that matches to a given instance
* @param sig The signature you are refering to.
* @return The number of arguments.
*/
-int rflct_get_in_args_count(opcode opc, int sig);
+int rflct_get_in_args_count(ir_opcode opc, int sig);
/**
* Get the number of out arguments.
* @param sig The signature you are refering to.
* @return The number of arguments.
*/
-int rflct_get_out_args_count(opcode opc, int sig);
+int rflct_get_out_args_count(ir_opcode opc, int sig);
#define rflct_get_args_count(opc, sig, use) \
((use) ? rflct_get_in_args_count(opc, sig) : rflct_get_out_args_count(opc, sig))
* 0 and the signature count).
* @return The array.
*/
-const rflct_arg_t *rflct_get_in_args(opcode opc, int sig);
+const rflct_arg_t *rflct_get_in_args(ir_opcode opc, int sig);
/**
* Get the array of def args.
* 0 and the signature count).
* @return The array.
*/
-const rflct_arg_t *rflct_get_out_args(opcode opc, int sig);
+const rflct_arg_t *rflct_get_out_args(ir_opcode opc, int sig);
#define rflct_get_args(opc, sig, use) \
((use) ? rflct_get_in_args(opc, sig) : rflct_get_out_args(opc, sig))
* @param sig The signature.
* @return buf.
*/
-char *rflct_to_string(char *buf, int n, opcode opc, int sig);
+char *rflct_to_string(char *buf, int n, ir_opcode opc, int sig);
/**
* Get a string representation of a mode class.
* @param name A name.
* @param commutative non-zero, if the opcode is commutative.
*/
-void rflct_new_opcode(opcode opc, const char *name, int commutative);
+void rflct_new_opcode(ir_opcode opc, const char *name, int commutative);
/**
* Add a signature to the opcode.
* @return non-zero, if the signature was added successfully, false if no
* more signatures can be added to the opcode.
*/
-int rflct_opcode_add_signature(opcode opc, rflct_sig_t *sig);
+int rflct_opcode_add_signature(ir_opcode opc, rflct_sig_t *sig);
/**
* Allocate a new signature.
*/
int rflct_signature_get_index(const rflct_sig_t *sig, int is_use, int num);
-
-#endif /* _FIRM_REFLECT_H */
+#endif