| 48 | /////////////////////////////////////////////////////////////////////////////// |
| 49 | |
| 50 | FunctionInvocationUnary * |
| 51 | FunctionInvocationUnary::CreateFunctionInvocationUnary( |
| 52 | CGContext &cg_context, eUnaryOps op, SafeOpFlags *flags) |
| 53 | { |
| 54 | FunctionInvocationUnary *fi = NULL; |
| 55 | if (flags) { |
| 56 | bool op1 = flags->get_op1_sign(); |
| 57 | enum SafeOpSize size = flags->get_op_size(); |
| 58 | |
| 59 | eSimpleType type = SafeOpFlags::flags_to_type(op1, size); |
| 60 | const Block *blk = cg_context.get_current_block(); |
| 61 | assert(blk); |
| 62 | |
| 63 | std::string tmp_var = blk->create_new_tmp_var(type); |
| 64 | fi = new FunctionInvocationUnary(op, flags, tmp_var); |
| 65 | } |
| 66 | else { |
| 67 | fi = new FunctionInvocationUnary(op, flags); |
| 68 | } |
| 69 | assert(fi); |
| 70 | return fi; |
| 71 | } |
| 72 | |
| 73 | FunctionInvocationUnary::FunctionInvocationUnary(eUnaryOps op, SafeOpFlags *flags) |
| 74 | : FunctionInvocation(eUnaryPrim, flags), |
nothing calls this directly
no test coverage detected