本文整理汇总了C++中InvokeInst::getLandingPadInst方法的典型用法代码示例。如果您正苦于以下问题:C++ InvokeInst::getLandingPadInst方法的具体用法?C++ InvokeInst::getLandingPadInst怎么用?C++ InvokeInst::getLandingPadInst使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InvokeInst
的用法示例。
在下文中一共展示了InvokeInst::getLandingPadInst方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handle_inst
//.........这里部分代码省略.........
break;
case Instruction::Store:
{
Value * sval = inst->getOperand(0);
Value * sadd = inst->getOperand(1);
addPtrTo(wrapValue(sadd), wrapValue(sval));
}
break;
case Instruction::GetElementPtr:
{
makeAlias(wrapValue(inst), handle_gep((GEPOperator*) inst));
}
break;
// conversion operations
case Instruction::Trunc:
case Instruction::ZExt:
case Instruction::SExt:
case Instruction::FPTrunc:
case Instruction::FPExt:
case Instruction::FPToUI:
case Instruction::FPToSI:
case Instruction::UIToFP:
case Instruction::SIToFP:
case Instruction::BitCast:
case Instruction::PtrToInt:
case Instruction::IntToPtr:
{
Value * itpv = inst->getOperand(0);
makeAlias(wrapValue(inst), wrapValue(itpv));
}
break;
// other operations
case Instruction::Invoke: // invoke is a terminal operation
{
InvokeInst * invoke = (InvokeInst*) inst;
LandingPadInst* lpd = invoke->getLandingPadInst();
parent_func->addLandingPad(invoke, lpd);
Value * cv = invoke->getCalledValue();
vector<Value*> args;
for (unsigned i = 0; i < invoke->getNumArgOperands(); i++) {
args.push_back(invoke->getArgOperand(i));
}
this->handle_invoke_call_inst(invoke, cv, &args, parent_func);
}
break;
case Instruction::Call:
{
CallInst * callinst = (CallInst*) inst;
if (callinst->isInlineAsm()) {
break;
}
Value * cv = callinst->getCalledValue();
vector<Value*> args;
for (unsigned i = 0; i < callinst->getNumArgOperands(); i++) {
args.push_back(callinst->getArgOperand(i));
}
this->handle_invoke_call_inst(callinst, cv, &args, parent_func);
}
break;
case Instruction::PHI:
{
PHINode *phi = (PHINode *) inst;
int nums = phi->getNumIncomingValues();
for (int i = 0; i < nums; i++) {
Value * p = phi->getIncomingValue(i);
makeAlias(wrapValue(inst), wrapValue(p));
}
}
break;
case Instruction::Select:
{
Value *first = ((SelectInst*) inst)->getTrueValue();
Value *second = ((SelectInst*) inst)->getFalseValue();
makeAlias(wrapValue(inst), wrapValue(first));
makeAlias(wrapValue(inst), wrapValue(second));
}
break;
case Instruction::VAArg:
{
parent_func->addVAArg(inst);
DyckVertex* vaarg = wrapValue(inst);
Value * ptrVaarg = inst->getOperand(0);
addPtrTo(wrapValue(ptrVaarg), vaarg);
}
break;
case Instruction::LandingPad: // handled with invoke inst
case Instruction::ICmp:
case Instruction::FCmp:
default:
break;
}
}