X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firop.c;h=da6f27d0a36a0243837a2e9923d38ae781ae51b4;hb=5f8ddee6b08c8040c0a304a347d65045c1141d52;hp=b3c77ce75c3308d6ba107cf717e46ec81b550bb7;hpb=6d36abf323fc5c7fba7ed2f1f6939a84b3e4a932;p=libfirm diff --git a/ir/ir/irop.c b/ir/ir/irop.c index b3c77ce75..da6f27d0a 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -5,8 +5,9 @@ ** */ -# include "irop.h" +# include "irop_t.h" # include "irnode_t.h" +# include "misc.h" ir_op *op_Block; @@ -126,6 +127,19 @@ init_op(void) op_Bad = new_ir_op (iro_Bad, id_from_str ("Bad", 3), 0, 0); } +/* Returns the string for the opcode. */ +const char *get_op_name (ir_op *op) { + return id_to_str(op->name); +} + +opcode get_op_code (ir_op *op){ + return op->code; +} + +ident *get_op_ident(ir_op *op){ + return op->name; +} + /* returns the attribute size of the operator. */ int get_op_attr_size (ir_op *op) { return op->attr_size;