[llvm-commits] [llvm] r39857 - in /llvm/trunk: include/llvm/Support/ConstantRange.h lib/Support/ConstantRange.cpp
Nick Lewycky
nicholas at mxc.ca
Sat Jul 14 10:41:03 PDT 2007
Author: nicholas
Date: Sat Jul 14 12:41:03 2007
New Revision: 39857
URL: http://llvm.org/viewvc/llvm-project?rev=39857&view=rev
Log:
Clarify the language. Pointed out by Duncan Sands.
Modified:
llvm/trunk/include/llvm/Support/ConstantRange.h
llvm/trunk/lib/Support/ConstantRange.cpp
Modified: llvm/trunk/include/llvm/Support/ConstantRange.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ConstantRange.h?rev=39857&r1=39856&r2=39857&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ConstantRange.h (original)
+++ llvm/trunk/include/llvm/Support/ConstantRange.h Sat Jul 14 12:41:03 2007
@@ -145,8 +145,11 @@
/// 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
Modified: llvm/trunk/lib/Support/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ConstantRange.cpp?rev=39857&r1=39856&r2=39857&view=diff
==============================================================================
--- llvm/trunk/lib/Support/ConstantRange.cpp (original)
+++ llvm/trunk/lib/Support/ConstantRange.cpp Sat Jul 14 12:41:03 2007
@@ -248,8 +248,10 @@
/// 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!");
More information about the llvm-commits
mailing list