]> granicus.if.org Git - llvm/commitdiff
[APInt] Use b.negate() in place of b = -std::move(b). NFCI
authorCraig Topper <craig.topper@gmail.com>
Fri, 19 May 2017 07:37:25 +0000 (07:37 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 19 May 2017 07:37:25 +0000 (07:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303411 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APInt.h

index 894e5571f8ad597a7c8a48486fb51d6a7362c741..d1bc2835de815ea189031feef6066727aa71db33 100644 (file)
@@ -2015,7 +2015,7 @@ inline APInt operator-(APInt a, const APInt &b) {
 }
 
 inline APInt operator-(const APInt &a, APInt &&b) {
-  b = -std::move(b);
+  b.negate();
   b += a;
   return std::move(b);
 }
@@ -2026,7 +2026,7 @@ inline APInt operator-(APInt a, uint64_t RHS) {
 }
 
 inline APInt operator-(uint64_t LHS, APInt b) {
-  b = -std::move(b);
+  b.negate();
   b += LHS;
   return b;
 }