From: Chris Lattner Date: Tue, 13 Feb 2007 07:25:36 +0000 (+0000) Subject: fix a critical bug in smallvector, where it would destroy elements that are X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8c06509f9590a63ab2d4361945aac18c02b71f0c;p=oota-llvm.git fix a critical bug in smallvector, where it would destroy elements that are not in its range (!). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34230 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(); } } };