Clarify the language. Pointed out by Duncan Sands.
authorNick Lewycky <nicholas@mxc.ca>
Sat, 14 Jul 2007 17:41:03 +0000 (17:41 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sat, 14 Jul 2007 17:41:03 +0000 (17:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39857 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/ConstantRange.h
lib/Support/ConstantRange.cpp

index 00c525ebf32c82f4ab122c3c1ce9670f5036f1e8..778827c0e0f658f89e752db6573f711b1232e0e3 100644 (file)
@@ -145,8 +145,11 @@ class ConstantRange {
 
   /// maximalIntersectWith - 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 is also
-  /// guaranteed to be the smallest possible set that does so.
+  /// include all elements contained in both input ranges, and to have the
+  /// smallest possible set size that does so.  Because there may be two
+  /// intersections with the same set size, A.maximalIntersectWith(B) might not
+  /// be equal to B.maximalIntersectWith(A).
+  ///
   ConstantRange maximalIntersectWith(const ConstantRange &CR) const;
 
   /// unionWith - Return the range that results from the union of this range
index 4f132e5ed5fd2900f949c5031fcb80b6e00afbea..fdfe28aaa95c88289d6cb830422f66f46f271e8a 100644 (file)
@@ -248,8 +248,10 @@ ConstantRange ConstantRange::intersectWith(const ConstantRange &CR) const {
 
 /// maximalIntersectWith - 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 is also guaranteed
-/// to be the smallest possible set that does so.
+/// include all elements contained in both input ranges, and to have the
+/// smallest possible set size that does so.  Because there may be two
+/// intersections with the same set size, A.maximalIntersectWith(B) might not
+/// be equal to B.maximalIntersect(A).
 ConstantRange ConstantRange::maximalIntersectWith(const ConstantRange &CR) const {
   assert(getBitWidth() == CR.getBitWidth() && 
          "ConstantRange types don't agree!");