diff options
| author | Craig Topper <craig.topper@gmail.com> | 2017-04-13 00:20:31 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2017-04-13 00:20:31 +0000 |
| commit | 37df0180a021647849875a1a19a8dd72362e2d8c (patch) | |
| tree | e2e10deec218c3becfbde03b59aaef556e3bf630 /llvm | |
| parent | 23ad196a22fc005958c0f60ff8b4fc2e4709a27a (diff) | |
| download | bcm5719-llvm-37df0180a021647849875a1a19a8dd72362e2d8c.tar.gz bcm5719-llvm-37df0180a021647849875a1a19a8dd72362e2d8c.zip | |
[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.
llvm-svn: 300146
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/IR/ConstantRange.h | 7 | ||||
| -rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/llvm/include/llvm/IR/ConstantRange.h b/llvm/include/llvm/IR/ConstantRange.h index 17c39a6ef9b..6d704666933 100644 --- a/llvm/include/llvm/IR/ConstantRange.h +++ b/llvm/include/llvm/IR/ConstantRange.h @@ -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 diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index f1826c02979..8dfd6c8036c 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -40,10 +40,10 @@ ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) { /// 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"); |

