[llvm] r303411 - [APInt] Use b.negate() in place of b = -std::move(b). NFCI

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 00:37:26 PDT 2017


Author: ctopper
Date: Fri May 19 02:37:25 2017
New Revision: 303411

URL: http://llvm.org/viewvc/llvm-project?rev=303411&view=rev
Log:
[APInt] Use b.negate() in place of b = -std::move(b). NFCI

Modified:
    llvm/trunk/include/llvm/ADT/APInt.h

Modified: llvm/trunk/include/llvm/ADT/APInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=303411&r1=303410&r2=303411&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APInt.h Fri May 19 02:37:25 2017
@@ -2015,7 +2015,7 @@ inline APInt operator-(APInt a, const AP
 }
 
 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
 }
 
 inline APInt operator-(uint64_t LHS, APInt b) {
-  b = -std::move(b);
+  b.negate();
   b += LHS;
   return b;
 }




More information about the llvm-commits mailing list