aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/IR/ConstantRange.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/ConstantRange.h')
-rw-r--r--include/llvm/IR/ConstantRange.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/IR/ConstantRange.h b/include/llvm/IR/ConstantRange.h
index 91f3f31abe17..964f9e8e9bc9 100644
--- a/include/llvm/IR/ConstantRange.h
+++ b/include/llvm/IR/ConstantRange.h
@@ -330,9 +330,13 @@ public:
/// from an addition of a value in this range and a value in \p Other.
ConstantRange add(const ConstantRange &Other) const;
- /// Return a new range representing the possible values resulting from a
- /// known NSW addition of a value in this range and \p Other constant.
- ConstantRange addWithNoSignedWrap(const APInt &Other) const;
+ /// Return a new range representing the possible values resulting
+ /// from an addition with wrap type \p NoWrapKind of a value in this
+ /// range and a value in \p Other.
+ /// If the result range is disjoint, the preferred range is determined by the
+ /// \p PreferredRangeType.
+ ConstantRange addWithNoWrap(const ConstantRange &Other, unsigned NoWrapKind,
+ PreferredRangeType RangeType = Smallest) const;
/// Return a new range representing the possible values resulting
/// from a subtraction of a value in this range and a value in \p Other.