mie: ir: op: add function to get type from mie_op_arg
This commit is contained in:
@@ -72,4 +72,6 @@ MIE_API void mie_op_destroy(struct mie_op *op);
|
||||
MIE_API void mie_op_init(struct mie_op *op);
|
||||
MIE_API void mie_op_cleanup(struct mie_op *op);
|
||||
|
||||
MIE_API const struct mie_type *mie_op_arg_get_type(const struct mie_op_arg *arg);
|
||||
|
||||
#endif
|
||||
|
||||
10
mie/ir/op-arg.c
Normal file
10
mie/ir/op-arg.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <mie/ir/op.h>
|
||||
|
||||
const struct mie_type *mie_op_arg_get_type(const struct mie_op_arg *arg)
|
||||
{
|
||||
if (arg->arg_flags & MIE_OP_F_ARG_RESOLVED) {
|
||||
return arg->arg_value->reg_type;
|
||||
}
|
||||
|
||||
return arg->arg_unresolved.reg_type;
|
||||
}
|
||||
Reference in New Issue
Block a user