[llvm-commits] [llvm] r68785 - /llvm/trunk/include/llvm/ADT/ilist.h
Chris Lattner
sabre at nondot.org
Fri Apr 10 08:47:18 PDT 2009
Author: lattner
Date: Fri Apr 10 10:47:17 2009
New Revision: 68785
URL: http://llvm.org/viewvc/llvm-project?rev=68785&view=rev
Log:
fix a broken assertion in ilist_iterator, which caused it to crash in the
bad case instead of actually assert. Bug pointed out by Jakob Stoklund
Olesen!
Modified:
llvm/trunk/include/llvm/ADT/ilist.h
Modified: llvm/trunk/include/llvm/ADT/ilist.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist.h?rev=68785&r1=68784&r2=68785&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist.h (original)
+++ llvm/trunk/include/llvm/ADT/ilist.h Fri Apr 10 10:47:17 2009
@@ -210,7 +210,7 @@
// Increment and decrement operators...
ilist_iterator &operator--() { // predecrement - Back up
NodePtr = Traits::getPrev(NodePtr);
- assert(Traits::getNext(NodePtr) && "--'d off the beginning of an ilist!");
+ assert(NodePtr && "--'d off the beginning of an ilist!");
return *this;
}
ilist_iterator &operator++() { // preincrement - Advance
More information about the llvm-commits
mailing list