aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-10 15:47:17 +0000
committerChris Lattner <sabre@nondot.org>2009-04-10 15:47:17 +0000
commit5c5f5a2ec2dd49bd3049fa0a55aca4956fc56ff2 (patch)
tree063de62f96ee58b4bed203290bce7b41e27633b4 /include
parentb357f0484b109895a0e51055dcda4dc28f77f00e (diff)
downloadexternal_llvm-5c5f5a2ec2dd49bd3049fa0a55aca4956fc56ff2.zip
external_llvm-5c5f5a2ec2dd49bd3049fa0a55aca4956fc56ff2.tar.gz
external_llvm-5c5f5a2ec2dd49bd3049fa0a55aca4956fc56ff2.tar.bz2
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/ilist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h
index 51442e3..9eb7005 100644
--- a/include/llvm/ADT/ilist.h
+++ b/include/llvm/ADT/ilist.h
@@ -210,7 +210,7 @@ public:
// 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