From 4f0ac5a526180fb2b64ed7ea41acdaab8b91a8bb Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 9 Jun 2023 13:37:11 -0400 Subject: Unify operator_cst range operator Move the declaration of the class to the range-op-mixed header, add the floating point prototypes as well, and use it in the new unified table. * range-op-float.cc (operator_cst::fold_range): New. * range-op-mixed.h (class operator_cst): Move from integer file. * range-op.cc (op_cst): New object. (unified_table::unified_table): Add op_cst. Also use for REAL_CST. (class operator_cst): Move to range-op-mixed.h. (integral_table::integral_table): Remove op_cst. (pointer_table::pointer_table): Remove op_cst. --- gcc/range-op-float.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/range-op-float.cc') diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index bc8ecc6..11d76f2 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -557,6 +557,13 @@ operator_identity::op1_range (frange &r, tree, const frange &lhs, return true; } +bool +operator_cst::fold_range (frange &r, tree, const frange &op1, + const frange &, relation_trio) const +{ + r = op1; + return true; +} bool operator_equal::op2_range (frange &r, tree type, -- cgit v1.1