From 3490afcd501eac7da4f755f3d9eb4179a6d8c9ff Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Feb 2007 07:25:36 +0000 Subject: [PATCH] fix a critical bug in smallvector, where it would destroy elements that are not in its range (!). llvm-svn: 34230 --- include/llvm/ADT/SmallVector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index befed925101..b5ee6c454b3 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -275,8 +275,8 @@ private: void destroy_range(T *S, T *E) { while (S != E) { - E->~T(); --E; + E->~T(); } } };