summaryrefslogtreecommitdiff
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.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/IR/ConstantRange.h b/include/llvm/IR/ConstantRange.h
index fd7f96abb19e1..6a50a8801f86f 100644
--- a/include/llvm/IR/ConstantRange.h
+++ b/include/llvm/IR/ConstantRange.h
@@ -41,7 +41,7 @@ namespace llvm {
class MDNode;
/// This class represents a range of values.
-class ConstantRange {
+class LLVM_NODISCARD ConstantRange {
APInt Lower, Upper;
public:
@@ -167,7 +167,10 @@ public:
APInt getSetSize() const;
/// Compare set size of this range with the range CR.
- bool isSizeStrictlySmallerThanOf(const ConstantRange &CR) const;
+ bool isSizeStrictlySmallerThan(const ConstantRange &CR) const;
+
+ // Compare set size of this range with Value.
+ bool isSizeLargerThan(uint64_t MaxSize) const;
/// Return the largest unsigned value contained in the ConstantRange.
APInt getUnsignedMax() const;