本文整理汇总了C++中LandingPadInst::isCatch方法的典型用法代码示例。如果您正苦于以下问题:C++ LandingPadInst::isCatch方法的具体用法?C++ LandingPadInst::isCatch怎么用?C++ LandingPadInst::isCatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LandingPadInst
的用法示例。
在下文中一共展示了LandingPadInst::isCatch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addLandingPadInfo
void llvm::addLandingPadInfo(const LandingPadInst &I, MachineBasicBlock &MBB) {
MachineFunction &MF = *MBB.getParent();
if (const auto *PF = dyn_cast<Function>(
I.getParent()->getParent()->getPersonalityFn()->stripPointerCasts()))
MF.getMMI().addPersonality(PF);
if (I.isCleanup())
MF.addCleanup(&MBB);
// FIXME: New EH - Add the clauses in reverse order. This isn't 100% correct,
// but we need to do it this way because of how the DWARF EH emitter
// processes the clauses.
for (unsigned i = I.getNumClauses(); i != 0; --i) {
Value *Val = I.getClause(i - 1);
if (I.isCatch(i - 1)) {
MF.addCatchTypeInfo(&MBB,
dyn_cast<GlobalValue>(Val->stripPointerCasts()));
} else {
// Add filters in a list.
Constant *CVal = cast<Constant>(Val);
SmallVector<const GlobalValue *, 4> FilterList;
for (User::op_iterator II = CVal->op_begin(), IE = CVal->op_end();
II != IE; ++II)
FilterList.push_back(cast<GlobalValue>((*II)->stripPointerCasts()));
MF.addFilterTypeInfo(&MBB, FilterList);
}
}
}