]> granicus.if.org Git - llvm/commitdiff
[APInt] Combine declaration and initialization. NFC
authorCraig Topper <craig.topper@gmail.com>
Sun, 2 Apr 2017 06:59:41 +0000 (06:59 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 2 Apr 2017 06:59:41 +0000 (06:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299325 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp

index 22a393c6f31c0d9590f3445ce91c17a638713660..f0b6d8f058952dbf332db9894aa7a269bc73bda2 100644 (file)
@@ -2489,9 +2489,7 @@ integerPart APInt::tcAdd(integerPart *dst, const integerPart *rhs,
   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(integerPart *dst, const integerPart *rhs,
   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);