Fixed a bug introduced by my last patch. Now we properly clear out the BatchIDVec
authorTed Kremenek <kremenek@apple.com>
Sat, 10 Nov 2007 19:33:26 +0000 (19:33 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 10 Nov 2007 19:33:26 +0000 (19:33 +0000)
vector before reusing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43984 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bitcode/Deserialize.h

index 87d0f12728aa79c9bd7e383181d7560d08eb5487..d8e3b38f4e7b3b38e1bf65f7bef1de6677b3169a 100644 (file)
@@ -213,6 +213,8 @@ public:
   
   template <typename T>
   void BatchReadOwnedPtrs(unsigned NumPtrs, T** Ptrs, bool AutoRegister=true) {
+    BatchIDVec.clear();
+    
     for (unsigned i = 0; i < NumPtrs; ++i)
       BatchIDVec.push_back(ReadPtrID());