本文整理汇总了C++中BasicBlock::endsWithReturn方法的典型用法代码示例。如果您正苦于以下问题:C++ BasicBlock::endsWithReturn方法的具体用法?C++ BasicBlock::endsWithReturn怎么用?C++ BasicBlock::endsWithReturn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicBlock
的用法示例。
在下文中一共展示了BasicBlock::endsWithReturn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: instrument
//.........这里部分代码省略.........
loops[addr] = f;
orderedloops.push_back(addr);
// find entries into this loop
for (uint32_t k = 0; k < head->getNumberOfSources(); k++){
BasicBlock* source = head->getSourceBlock(k);
if (!loop->isBlockIn(source->getIndex())){
LoopPoint* lp = new LoopPoint();
points->append(lp);
lp->flowgraph = flowgraph;
lp->source = source;
lp->target = NULL;
lp->entry = true;
lp->interpose = false;
if (source->getBaseAddress() + source->getNumberOfBytes() != head->getBaseAddress()){
lp->interpose = true;
lp->target = head;
}
entryc++;
}
}
}
ControlInfo f = loops[addr];
points = f.info;
// find exits from this loop
uint32_t exitc = 0;
for (uint32_t k = 0; k < loop->getNumberOfBlocks(); k++){
BasicBlock* bb = allLoopBlocks[k];
if (bb->endsWithReturn()){
LoopPoint* lp = new LoopPoint();
points->append(lp);
lp->flowgraph = flowgraph;
lp->source = bb;
lp->target = NULL;
lp->entry = false;
lp->interpose = false;
exitc++;
}
for (uint32_t m = 0; m < bb->getNumberOfTargets(); m++){
BasicBlock* target = bb->getTargetBlock(m);
if (!loop->isBlockIn(target->getIndex())){
LoopPoint* lp = new LoopPoint();
points->append(lp);
lp->flowgraph = flowgraph;
lp->source = bb;
lp->target = NULL;
lp->entry = false;
lp->interpose = false;
if (target->getBaseAddress() != bb->getBaseAddress() + bb->getNumberOfBytes()){
lp->interpose = true;
lp->target = target;
}
exitc++;
}
}
}