mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Added two new overloaded versions of BatchEmitOwnedPtrs and
BatchReadOwnedPtrs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user