diff options
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/Deserialize.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/Bitcode/Reader/Deserialize.cpp b/lib/Bitcode/Reader/Deserialize.cpp index ea6b27a62e..965ff708a2 100644 --- a/lib/Bitcode/Reader/Deserialize.cpp +++ b/lib/Bitcode/Reader/Deserialize.cpp @@ -13,6 +13,8 @@ #include "llvm/Bitcode/Deserialize.h" +#define DEBUG_BACKPATCH + #ifdef DEBUG_BACKPATCH #include "llvm/Support/Streams.h" #endif @@ -346,18 +348,24 @@ void Deserializer::ReadUIntPtr(uintptr_t& PtrRef, return; } -#ifdef DEBUG_BACKPATCH - llvm::cerr << "ReadUintPtr: " << PtrId << "\n"; -#endif - MapTy::value_type& E = BPatchMap.FindAndConstruct(BPKey(PtrId)); - if (HasFinalPtr(E)) + if (HasFinalPtr(E)) { PtrRef = GetFinalPtr(E); + +#ifdef DEBUG_BACKPATCH + llvm::cerr << "ReadUintPtr: " << PtrId + << " <-- " << (void*) GetFinalPtr(E) << '\n'; +#endif + } else { assert (AllowBackpatch && "Client forbids backpatching for this pointer."); +#ifdef DEBUG_BACKPATCH + llvm::cerr << "ReadUintPtr: " << PtrId << " (NO PTR YET)\n"; +#endif + // Register backpatch. Check the freelist for a BPNode. BPNode* N; |