]> granicus.if.org Git - llvm/commitdiff
[APInt] Use conditional operator to simplify some code. NFC
authorCraig Topper <craig.topper@gmail.com>
Sat, 1 Apr 2017 21:50:10 +0000 (21:50 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 1 Apr 2017 21:50:10 +0000 (21:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299320 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp

index f4190eb805d4ad5dec61825cb558708c2dae0f08..e34d0f34674eda17c044903f92453b767c39f61c 100644 (file)
@@ -2819,10 +2819,7 @@ int APInt::tcCompare(const integerPart *lhs, const integerPart *rhs,
     if (lhs[parts] == rhs[parts])
       continue;
 
-    if (lhs[parts] > rhs[parts])
-      return 1;
-    else
-      return -1;
+    return (lhs[parts] > rhs[parts]) ? 1 : -1;
   }
 
   return 0;