return static_cast<BasicBlock*>(&Sentinel);
}
static void destroySentinel(BasicBlock*) {}
- static iplist<BasicBlock> &getList(Function *F);
+
+ BasicBlock *provideInitialHead() const { return createSentinel(); }
+ BasicBlock *ensureHead(BasicBlock*) const { return createSentinel(); }
+ static void noteHead(BasicBlock*, BasicBlock*) {}
+
static ValueSymbolTable *getSymTab(Function *ItemParent);
- static int getListOffset();
private:
mutable ilist_node<BasicBlock> Sentinel;
};
return static_cast<Argument*>(&Sentinel);
}
static void destroySentinel(Argument*) {}
- static iplist<Argument> &getList(Function *F);
+
+ Argument *provideInitialHead() const { return createSentinel(); }
+ Argument *ensureHead(Argument*) const { return createSentinel(); }
+ static void noteHead(Argument*, Argument*) {}
+
static ValueSymbolTable *getSymTab(Function *ItemParent);
- static int getListOffset();
private:
mutable ilist_node<Argument> Sentinel;
};
CheckLazyArguments();
return ArgumentList;
}
+ static iplist<Argument> Function::*getSublistAccess(Argument*) {
+ return &Function::ArgumentList;
+ }
const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; }
BasicBlockListType &getBasicBlockList() { return BasicBlocks; }
+ static iplist<BasicBlock> Function::*getSublistAccess(BasicBlock*) {
+ return &Function::BasicBlocks;
+ }
const BasicBlock &getEntryBlock() const { return front(); }
BasicBlock &getEntryBlock() { return front(); }
/// including any contained basic blocks.
///
void dropAllReferences();
-
- static unsigned getBasicBlockListOffset() {
- Function *Obj = 0;
- return unsigned(reinterpret_cast<uintptr_t>(&Obj->BasicBlocks));
- }
- static unsigned getArgumentListOffset() {
- Function *Obj = 0;
- return unsigned(reinterpret_cast<uintptr_t>(&Obj->ArgumentList));
- }
};
inline ValueSymbolTable *
return F ? &F->getValueSymbolTable() : 0;
}
-inline int
-ilist_traits<BasicBlock>::getListOffset() {
- return Function::getBasicBlockListOffset();
-}
-
-inline int
-ilist_traits<Argument>::getListOffset() {
- return Function::getArgumentListOffset();
-}
-
-
} // End llvm namespace
#endif