19void Block::addPointer(
Pointer *P) {
23 assert(!hasPointer(P));
26 Pointers->BS.Prev = P;
31 assert(hasPointer(P));
35void Block::removePointer(
Pointer *P) {
40 assert(hasPointer(P));
43 BlockPointer &BP = P->
BS;
54 assert(!hasPointer(P));
58void Block::cleanup() {
60 (
reinterpret_cast<DeadBlock *
>(
this + 1) - 1)->free();
67 assert(
New->isBlockPointer());
70 assert(hasPointer(Old));
73 BlockPointer &OldBP = Old->
BS;
74 BlockPointer &NewBP =
New->BS;
88 assert(!hasPointer(Old));
89 assert(hasPointer(
New));
94bool Block::hasPointer(
const Pointer *P)
const {
104 : Root(Root), B(~0u, Blk->Desc, Blk->isExtern(), Blk->IsStatic,
105 Blk->isWeak(), Blk->isDummy(),
true) {
114 B.DynAllocId = Blk->DynAllocId;
117 B.Pointers = Blk->Pointers;
120 Blk->Pointers =
nullptr;
123void DeadBlock::free() {
bool isInitialized() const
Returns whether the data of this block has been initialized via invoking the Ctor func.
DeadBlock(DeadBlock *&Root, Block *Blk)
Copies the block.
A pointer to a memory block, live or dead.
bool isBlockPointer() const
const BlockPointer & asBlockPointer() const
The JSON file list parser is used to communicate input to InstallAPI.
for(const auto &A :T->param_types())
Pointer * Prev
Previous link in the pointer chain.
Pointer * Next
Next link in the pointer chain.
Block * Pointee
The block the pointer is pointing to.