美文网首页LLVM
遍历LLVM IR指令的操作数

遍历LLVM IR指令的操作数

作者: HaoMengHIT | 来源:发表于2019-03-15 17:39 被阅读0次

    通过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())) {
    ...
        }
    }
    

    相关文章

      网友评论

        本文标题:遍历LLVM IR指令的操作数

        本文链接:https://www.haomeiwen.com/subject/ezurmqtx.html