本文整理汇总了C++中ConstantExpr::isGEPWithNoNotionalOverIndexing方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstantExpr::isGEPWithNoNotionalOverIndexing方法的具体用法?C++ ConstantExpr::isGEPWithNoNotionalOverIndexing怎么用?C++ ConstantExpr::isGEPWithNoNotionalOverIndexing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConstantExpr
的用法示例。
在下文中一共展示了ConstantExpr::isGEPWithNoNotionalOverIndexing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runOnFunction
virtual bool runOnFunction(Function &F) {
//F.dump();
bool changed = false;
for (inst_iterator inst_it = inst_begin(F), _inst_end = inst_end(F); inst_it != _inst_end; ++inst_it) {
LoadInst *li = dyn_cast<LoadInst>(&*inst_it);
if (!li) continue;
ConstantExpr *ce = dyn_cast<ConstantExpr>(li->getOperand(0));
// Not 100% sure what the isGEPWithNoNotionalOverIndexing() means, but
// at least it checks if it's a gep:
if (ce && ce->isGEPWithNoNotionalOverIndexing() && ce->getOperand(0)->getType() == g.llvm_flavor_type_ptr) {
changed = handleFlavor(li, ce);
}
GlobalVariable *gv = dyn_cast<GlobalVariable>(li->getOperand(0));
if (!gv) continue;
llvm::Type* gv_t = gv->getType();
if (gv_t == g.llvm_bool_type_ptr->getPointerTo()) {
changed = handleBool(li, gv) || changed;
continue;
}
if (gv_t == g.llvm_class_type_ptr->getPointerTo()) {
changed = handleCls(li, gv) || changed;
continue;
}
}
return changed;
}