summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-01 21:50:10 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-01 21:50:10 +0000
commit68a3ed2e1baa1a369c6dd1b11ea177d56e546922 (patch)
treef2282cca7351eccb148ee18a401619d3d7d1517a /llvm/lib/Support
parenta742cb5fc85855c95b9cf824361197bef027ab7b (diff)
downloadbcm5719-llvm-68a3ed2e1baa1a369c6dd1b11ea177d56e546922.tar.gz
bcm5719-llvm-68a3ed2e1baa1a369c6dd1b11ea177d56e546922.zip
[APInt] Use conditional operator to simplify some code. NFC
llvm-svn: 299320
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APInt.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index f4190eb805d..e34d0f34674 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud