projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a742cb5
)
[APInt] Use conditional operator to simplify some code. NFC
author
Craig Topper
<craig.topper@gmail.com>
Sat, 1 Apr 2017 21:50:10 +0000
(21:50 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Sat, 1 Apr 2017 21:50:10 +0000
(21:50 +0000)
llvm-svn: 299320
llvm/lib/Support/APInt.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/APInt.cpp
b/llvm/lib/Support/APInt.cpp
index f4190eb805d4ad5dec61825cb558708c2dae0f08..e34d0f34674eda17c044903f92453b767c39f61c 100644
(file)
--- 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;