diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-11-14 08:05:03 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-11-14 08:05:03 +0000 |
commit | 545f7e39e1e95990acc951f27e67f3527496a6b1 (patch) | |
tree | 740423525d3c37da5c4a0f575872a705a4b71123 /llvm/lib/Bitcode | |
parent | 7f02cfa599ab5a0f3d0f81df710a1514267cc52c (diff) | |
download | bcm5719-llvm-545f7e39e1e95990acc951f27e67f3527496a6b1.tar.gz bcm5719-llvm-545f7e39e1e95990acc951f27e67f3527496a6b1.zip |
Added two new overloaded versions of BatchEmitOwnedPtrs and
BatchReadOwnedPtrs.
llvm-svn: 44105
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/Deserialize.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Reader/Deserialize.cpp b/llvm/lib/Bitcode/Reader/Deserialize.cpp index ea6b27a62e9..965ff708a2c 100644 --- a/llvm/lib/Bitcode/Reader/Deserialize.cpp +++ b/llvm/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; |