llvm.org GIT mirror llvm / 303f7fe
Fixed hack in BatchReadOwnedPtrs to no longer use the array of pointers passed in for deserialization as a temporary location for storing serialized pointer identifiers. The definition of SerializedPtrID will likely change significantly in the future, and the current implementation caused compilation errors on some 64-bit machines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43983 91177308-0d34-0410-b5e6-96231b3b80d8 Ted Kremenek 12 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
125125 unsigned AbbrevNo;
126126 unsigned RecordCode;
127127 Location StreamStart;
128 std::vector BatchIDVec;
128129
129130 //===----------------------------------------------------------===//
130131 // Public Interface.
212213 template
213214 void BatchReadOwnedPtrs(unsigned NumPtrs, T** Ptrs, bool AutoRegister=true) {
214215 for (unsigned i = 0; i < NumPtrs; ++i)
215 reinterpret_cast(Ptrs[i]) = ReadPtrID();
216 BatchIDVec.push_back(ReadPtrID());
216217
217218 for (unsigned i = 0; i < NumPtrs; ++i) {
218 SerializedPtrID PtrID = reinterpret_cast(Ptrs[i]);
219 SerializedPtrID& PtrID = BatchIDVec[i];
220
219221 T* p = PtrID ? SerializeTrait::Materialize(*this) : NULL;
220222
221223 if (PtrID && AutoRegister)