[llvm] r299325 - [APInt] Combine declaration and initialization. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 1 23:59:41 PDT 2017


Author: ctopper
Date: Sun Apr  2 01:59:41 2017
New Revision: 299325

URL: http://llvm.org/viewvc/llvm-project?rev=299325&view=rev
Log:
[APInt] Combine declaration and initialization. NFC

Modified:
    llvm/trunk/lib/Support/APInt.cpp

Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=299325&r1=299324&r2=299325&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Sun Apr  2 01:59:41 2017
@@ -2489,9 +2489,7 @@ integerPart APInt::tcAdd(integerPart *ds
   assert(c <= 1);
 
   for (unsigned i = 0; i < parts; i++) {
-    integerPart l;
-
-    l = dst[i];
+    integerPart l = dst[i];
     if (c) {
       dst[i] += rhs[i] + 1;
       c = (dst[i] <= l);
@@ -2511,9 +2509,7 @@ integerPart APInt::tcSubtract(integerPar
   assert(c <= 1);
 
   for (unsigned i = 0; i < parts; i++) {
-    integerPart l;
-
-    l = dst[i];
+    integerPart l = dst[i];
     if (c) {
       dst[i] -= rhs[i] + 1;
       c = (dst[i] >= l);




More information about the llvm-commits mailing list