Allow using MemoryBuffers with yaml::Stream directly.
[oota-llvm.git] / include / llvm / Support / ConstantRange.h
index c84e64ada963f407452a32f6a700f38d0e6419a8..90dd69fa478fe269b7ca3b8a005e3049d28c6826 100644 (file)
@@ -33,7 +33,7 @@
 #define LLVM_SUPPORT_CONSTANT_RANGE_H
 
 #include "llvm/ADT/APInt.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
 
@@ -47,9 +47,6 @@ public:
   ///
   explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true);
 
-  /// Default constructor that creates an uninitialized ConstantRange.
-  ConstantRange() {}
-
   /// Initialize a range to hold the single specified value.
   ///
   ConstantRange(const APInt &Value);
@@ -57,7 +54,7 @@ public:
   /// @brief Initialize a range of values explicitly. This will assert out if
   /// Lower==Upper and Lower != Min or Max value for its type. It will also
   /// assert out if the two APInt's are not the same bit width.
-  ConstantRange(const APInt& Lower, const APInt& Upper);
+  ConstantRange(const APInt &Lower, const APInt &Upper);
 
   /// makeICmpRegion - Produce the smallest range that contains all values that
   /// might satisfy the comparison specified by Pred when compared to any value
@@ -158,6 +155,10 @@ public:
   /// constant range.
   ConstantRange subtract(const APInt &CI) const;
 
+  /// \brief Subtract the specified range from this range (aka relative
+  /// complement of the sets).
+  ConstantRange difference(const ConstantRange &CR) const;
+
   /// intersectWith - Return the range that results from the intersection of
   /// this range with another range.  The resultant range is guaranteed to
   /// include all elements contained in both input ranges, and to have the