diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-08-03 23:00:38 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-08-03 23:00:38 +0000 |
commit | befa21532c52ff65a87bd75b2c245e983dd1e205 (patch) | |
tree | 3e0be0dc75687f89c5e18a5ae412d5fbd54523dc /llvm/lib | |
parent | 2ef67440fc1e038c52a6bb6d874f34186e6b3b31 (diff) | |
download | bcm5719-llvm-befa21532c52ff65a87bd75b2c245e983dd1e205.tar.gz bcm5719-llvm-befa21532c52ff65a87bd75b2c245e983dd1e205.zip |
CodeGen: silence a warning
GCC 4.8.2 objects to the tautological condition in the assert as the unsigned
value is guaranteed to be >= 0. Simplify the assertion by dropping the
tautological condition.
llvm-svn: 214671
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineCombiner.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index 591c4caf66e..9ec7239b098 100644 --- a/llvm/lib/CodeGen/MachineCombiner.cpp +++ b/llvm/lib/CodeGen/MachineCombiner.cpp @@ -144,8 +144,7 @@ MachineCombiner::getDepth(SmallVectorImpl<MachineInstr *> &InsInstrs, InstrIdxForVirtReg.find(MO.getReg()); if (II != InstrIdxForVirtReg.end()) { // Operand is new virtual register not in trace - assert(II->second >= 0 && II->second < InstrDepth.size() && - "Bad Index"); + assert(II->second < InstrDepth.size() && "Bad Index"); MachineInstr *DefInstr = InsInstrs[II->second]; assert(DefInstr && "There must be a definition for a new virtual register"); |