mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
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. llvm-svn: 43983
This commit is contained in:
parent
54dec4ece0
commit
72b9e78ab1
@ -126,6 +126,7 @@ private:
|
||||
unsigned AbbrevNo;
|
||||
unsigned RecordCode;
|
||||
Location StreamStart;
|
||||
std::vector<SerializedPtrID> BatchIDVec;
|
||||
|
||||
//===----------------------------------------------------------===//
|
||||
// Public Interface.
|
||||
@ -213,10 +214,11 @@ public:
|
||||
template <typename T>
|
||||
void BatchReadOwnedPtrs(unsigned NumPtrs, T** Ptrs, bool AutoRegister=true) {
|
||||
for (unsigned i = 0; i < NumPtrs; ++i)
|
||||
reinterpret_cast<SerializedPtrID&>(Ptrs[i]) = ReadPtrID();
|
||||
BatchIDVec.push_back(ReadPtrID());
|
||||
|
||||
for (unsigned i = 0; i < NumPtrs; ++i) {
|
||||
SerializedPtrID PtrID = reinterpret_cast<SerializedPtrID>(Ptrs[i]);
|
||||
SerializedPtrID& PtrID = BatchIDVec[i];
|
||||
|
||||
T* p = PtrID ? SerializeTrait<T>::Materialize(*this) : NULL;
|
||||
|
||||
if (PtrID && AutoRegister)
|
||||
|
Loading…
Reference in New Issue
Block a user