[llvm] r302383 - [ConstantRange] Remove 'Of' from name of ConstantRange::isSizeStrictlySmallerThanOf so that it reads better. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun May 7 14:48:08 PDT 2017


Author: ctopper
Date: Sun May  7 16:48:08 2017
New Revision: 302383

URL: http://llvm.org/viewvc/llvm-project?rev=302383&view=rev
Log:
[ConstantRange] Remove 'Of' from name of ConstantRange::isSizeStrictlySmallerThanOf so that it reads better. NFC

Modified:
    llvm/trunk/include/llvm/IR/ConstantRange.h
    llvm/trunk/lib/IR/ConstantRange.cpp

Modified: llvm/trunk/include/llvm/IR/ConstantRange.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ConstantRange.h?rev=302383&r1=302382&r2=302383&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ConstantRange.h (original)
+++ llvm/trunk/include/llvm/IR/ConstantRange.h Sun May  7 16:48:08 2017
@@ -167,7 +167,7 @@ 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;
 
   /// Return the largest unsigned value contained in the ConstantRange.
   APInt getUnsignedMax() const;

Modified: llvm/trunk/lib/IR/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantRange.cpp?rev=302383&r1=302382&r2=302383&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantRange.cpp (original)
+++ llvm/trunk/lib/IR/ConstantRange.cpp Sun May  7 16:48:08 2017
@@ -251,7 +251,7 @@ APInt ConstantRange::getSetSize() const
 }
 
 bool
-ConstantRange::isSizeStrictlySmallerThanOf(const ConstantRange &Other) const {
+ConstantRange::isSizeStrictlySmallerThan(const ConstantRange &Other) const {
   assert(getBitWidth() == Other.getBitWidth());
   if (isFullSet())
     return false;
@@ -374,7 +374,7 @@ ConstantRange ConstantRange::intersectWi
       if (CR.Upper.ule(Lower))
         return ConstantRange(CR.Lower, Upper);
 
-      if (isSizeStrictlySmallerThanOf(CR))
+      if (isSizeStrictlySmallerThan(CR))
         return *this;
       return CR;
     }
@@ -389,7 +389,7 @@ ConstantRange ConstantRange::intersectWi
 
   if (CR.Upper.ult(Upper)) {
     if (CR.Lower.ult(Upper)) {
-      if (isSizeStrictlySmallerThanOf(CR))
+      if (isSizeStrictlySmallerThan(CR))
         return *this;
       return CR;
     }
@@ -405,7 +405,7 @@ ConstantRange ConstantRange::intersectWi
 
     return ConstantRange(CR.Lower, Upper);
   }
-  if (isSizeStrictlySmallerThanOf(CR))
+  if (isSizeStrictlySmallerThan(CR))
     return *this;
   return CR;
 }
@@ -676,8 +676,8 @@ ConstantRange::add(const ConstantRange &
     return ConstantRange(getBitWidth(), /*isFullSet=*/true);
 
   ConstantRange X = ConstantRange(std::move(NewLower), std::move(NewUpper));
-  if (X.isSizeStrictlySmallerThanOf(*this) ||
-      X.isSizeStrictlySmallerThanOf(Other))
+  if (X.isSizeStrictlySmallerThan(*this) ||
+      X.isSizeStrictlySmallerThan(Other))
     // We've wrapped, therefore, full set.
     return ConstantRange(getBitWidth(), /*isFullSet=*/true);
   return X;
@@ -709,8 +709,8 @@ ConstantRange::sub(const ConstantRange &
     return ConstantRange(getBitWidth(), /*isFullSet=*/true);
 
   ConstantRange X = ConstantRange(std::move(NewLower), std::move(NewUpper));
-  if (X.isSizeStrictlySmallerThanOf(*this) ||
-      X.isSizeStrictlySmallerThanOf(Other))
+  if (X.isSizeStrictlySmallerThan(*this) ||
+      X.isSizeStrictlySmallerThan(Other))
     // We've wrapped, therefore, full set.
     return ConstantRange(getBitWidth(), /*isFullSet=*/true);
   return X;
@@ -766,7 +766,7 @@ ConstantRange::multiply(const ConstantRa
   ConstantRange Result_sext(std::min(L, Compare), std::max(L, Compare) + 1);
   ConstantRange SR = Result_sext.truncate(getBitWidth());
 
-  return UR.isSizeStrictlySmallerThanOf(SR) ? UR : SR;
+  return UR.isSizeStrictlySmallerThan(SR) ? UR : SR;
 }
 
 ConstantRange




More information about the llvm-commits mailing list