[llvm] r300146 - [IR] Remove the APIntMoveTy typedef from ConstantRange. Use APInt type directly.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 17:20:32 PDT 2017


Author: ctopper
Date: Wed Apr 12 19:20:31 2017
New Revision: 300146

URL: http://llvm.org/viewvc/llvm-project?rev=300146&view=rev
Log:
[IR] Remove the APIntMoveTy typedef from ConstantRange. Use APInt type directly.

This typedef used to be conditional based on whether rvalue references were supported. Looks like it got left behind when we switched to always having rvalue references with c++11. I don't think it provides any value now.


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=300146&r1=300145&r2=300146&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ConstantRange.h (original)
+++ llvm/trunk/include/llvm/IR/ConstantRange.h Wed Apr 12 19:20:31 2017
@@ -45,9 +45,6 @@ class MDNode;
 class ConstantRange {
   APInt Lower, Upper;
 
-  // If we have move semantics, pass APInts by value and move them into place.
-  typedef APInt APIntMoveTy;
-
 public:
   /// Initialize a full (the default) or empty set for the specified bit width.
   ///
@@ -55,12 +52,12 @@ public:
 
   /// Initialize a range to hold the single specified value.
   ///
-  ConstantRange(APIntMoveTy Value);
+  ConstantRange(APInt Value);
 
   /// @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(APIntMoveTy Lower, APIntMoveTy Upper);
+  ConstantRange(APInt Lower, APInt Upper);
 
   /// Produce the smallest range such that all values that may satisfy the given
   /// predicate with any value contained within Other is contained in the

Modified: llvm/trunk/lib/IR/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantRange.cpp?rev=300146&r1=300145&r2=300146&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantRange.cpp (original)
+++ llvm/trunk/lib/IR/ConstantRange.cpp Wed Apr 12 19:20:31 2017
@@ -40,10 +40,10 @@ ConstantRange::ConstantRange(uint32_t Bi
 
 /// Initialize a range to hold the single specified value.
 ///
-ConstantRange::ConstantRange(APIntMoveTy V)
+ConstantRange::ConstantRange(APInt V)
     : Lower(std::move(V)), Upper(Lower + 1) {}
 
-ConstantRange::ConstantRange(APIntMoveTy L, APIntMoveTy U)
+ConstantRange::ConstantRange(APInt L, APInt U)
     : Lower(std::move(L)), Upper(std::move(U)) {
   assert(Lower.getBitWidth() == Upper.getBitWidth() &&
          "ConstantRange with unequal bit widths");




More information about the llvm-commits mailing list