by value. This version prohibits backpatching of pointers, so it
useful when a pointee is always known to be deserialized beforehand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43799
91177308-0d34-0410-b5e6-
96231b3b80d8
template <typename T>
void ReadPtr(const T*& PtrRef, bool AllowBackpatch = true) {
ReadPtr(const_cast<T*&>(PtrRef), AllowBackpatch);
- }
+ }
+
+ template <typename T>
+ T* ReadPtr() { T* x; ReadPtr<T>(x,false); return x; }
void ReadUIntPtr(uintptr_t& PtrRef, bool AllowBackpatch = true);