diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h index 2b0e127265d9..7792ab069ed4 100644 --- a/llvm/include/llvm/ADT/BitVector.h +++ b/llvm/include/llvm/ADT/BitVector.h @@ -86,6 +86,10 @@ public: Bits = new BitWord[Capacity]; std::copy(RHS.Bits, &RHS.Bits[Capacity], Bits); } + + ~BitVector() { + delete[] Bits; + } /// size - Returns the number of bits in this bitvector. unsigned size() const { return Size; }