遍历LLVM IR指令的操作数
2019-03-15 本文已影响0人
HaoMengHIT
通过User中提供的op_iterator迭代器来遍历Instruction中的操作数
Instruction* V = ...
for (User::op_iterator op = V->op_begin(), e = V->op_end(); op != e; ++op){
if (Instruction *U = dyn_cast<Instruction>(op->get())) {
...
}
}