From 548688adbde4f76a7ad891c68f81cab7950b978b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 1 Apr 2017 21:50:10 +0000 Subject: [PATCH] [APInt] Use conditional operator to simplify some code. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299320 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/APInt.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index f4190eb805d..e34d0f34674 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -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; -- 2.40.0