Author: kremenek
Date: Tue Nov 6 18:47:33 2007
New Revision: 43799
URL: http://llvm.org/viewvc/llvm-project?rev=43799&view=rev
Log:
Added special version of ReadPtr() that returns a deserialized pointer
by value. This version prohibits backpatching of pointers, so it
useful when a pointee is always known to be deserialized beforehand.
Modified:
llvm/trunk/include/llvm/Bitcode/Deserialize.h
Modified: llvm/trunk/include/llvm/Bitcode/Deserialize.h
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/Deserialize.h?rev=43799&r1=43798&r2=43799&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/Deserialize.h (original)
+++ llvm/trunk/include/llvm/Bitcode/Deserialize.h Tue Nov 6 18:47:33 2007
@@ -141,7 +141,10 @@
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);
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits