Some operations are exactly the same for all unops, including casts. To make things more readable and decrease the amount of churn, create a range OP_UNOP - OP_UNOP_END like already done for binops. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- linearize.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/linearize.h b/linearize.h index db4a67f3d..5e8fb1faf 100644 --- a/linearize.h +++ b/linearize.h @@ -215,10 +215,18 @@ enum opcode { OP_BINCMP_END = OP_SET_AE, /* Uni */ - OP_NOT, + OP_UNOP, + OP_NOT = OP_UNOP, OP_NEG, OP_FNEG, + /* Casts */ + OP_CAST, + OP_SCAST, + OP_FPCAST, + OP_PTRCAST, + OP_UNOP_END = OP_PTRCAST, + /* Select - three input values */ OP_SEL, @@ -232,10 +240,6 @@ enum opcode { /* Other */ OP_PHI, OP_PHISOURCE, - OP_CAST, - OP_SCAST, - OP_FPCAST, - OP_PTRCAST, OP_INLINED_CALL, OP_CALL, OP_SLICE, -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html