mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
MC CFG: Add more MCFunction container methods (find, empty).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,6 +30,18 @@ MCBasicBlock &MCFunction::createBlock(const MCTextAtom &TA) {
|
||||
return *Blocks.back();
|
||||
}
|
||||
|
||||
const MCBasicBlock *MCFunction::find(uint64_t StartAddr) const {
|
||||
for (const_iterator I = begin(), E = end(); I != E; ++I)
|
||||
if ((*I)->getInsts()->getBeginAddr() == StartAddr)
|
||||
return (*I);
|
||||
return 0;
|
||||
}
|
||||
|
||||
MCBasicBlock *MCFunction::find(uint64_t StartAddr) {
|
||||
return const_cast<MCBasicBlock *>(
|
||||
const_cast<const MCFunction *>(this)->find(StartAddr));
|
||||
}
|
||||
|
||||
// MCBasicBlock
|
||||
|
||||
MCBasicBlock::MCBasicBlock(const MCTextAtom &Insts, MCFunction *Parent)
|
||||
|
Reference in New Issue
Block a user