mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-11 15:26:07 +00:00
make qsort predicate more conformant by returning 0 for equal values.
llvm-svn: 121838
This commit is contained in:
parent
e1ee3c537d
commit
1499119975
@ -592,7 +592,11 @@ namespace {
|
||||
static int ConstantIntSortPredicate(const void *P1, const void *P2) {
|
||||
const ConstantInt *LHS = *(const ConstantInt**)P1;
|
||||
const ConstantInt *RHS = *(const ConstantInt**)P2;
|
||||
return LHS->getValue().ult(RHS->getValue()) ? 1 : -1;
|
||||
if (LHS->getValue().ult(RHS->getValue()))
|
||||
return 1;
|
||||
if (LHS->getValue() == RHS->getValue())
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// FoldValueComparisonIntoPredecessors - The specified terminator is a value
|
||||
|
Loading…
x
Reference in New Issue
Block a user