diff options
author | Cong Hou <congh@google.com> | 2015-12-13 17:00:25 +0000 |
---|---|---|
committer | Cong Hou <congh@google.com> | 2015-12-13 17:00:25 +0000 |
commit | c00e65aa893c45814bf2186de56b7e0f2d418a5c (patch) | |
tree | 4dee2c8aeca7d46bdaf771b32a268e7db9bcf38d /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | e6a210f50b6700397e336794fe5f387ef0890629 (diff) | |
download | llvm-c00e65aa893c45814bf2186de56b7e0f2d418a5c.zip llvm-c00e65aa893c45814bf2186de56b7e0f2d418a5c.tar.gz llvm-c00e65aa893c45814bf2186de56b7e0f2d418a5c.tar.bz2 |
Fix a type issue in r255455. Should not use unsigned type as std::abs()'s template type.
llvm-svn: 255461
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 4065afa..76099f2 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -515,7 +515,7 @@ void MachineBasicBlock::validateSuccProbs() const { // Due to precision issue, we assume that the sum of probabilities is one if // the difference between the sum of their numerators and the denominator is // no greater than the number of successors. - assert(std::abs<uint64_t>(Sum - BranchProbability::getDenominator()) <= + assert((uint64_t)std::abs(Sum - BranchProbability::getDenominator()) <= Probs.size() && "The sum of successors's probabilities exceeds one."); #endif // NDEBUG |