| 74 | } |
| 75 | |
| 76 | bool exist(const std::set<RDNode> &Nodes, std::string FuncName, unsigned BIdx, |
| 77 | unsigned IIdx, int OIdx) const { |
| 78 | |
| 79 | auto *I = IRAH->getInstruction(FuncName, BIdx, IIdx); |
| 80 | if (!I) |
| 81 | return false; |
| 82 | |
| 83 | for (auto &Node : Nodes) { |
| 84 | auto Def = Node.getDefinition(); |
| 85 | if (Def.first != I || Def.second != OIdx) |
| 86 | continue; |
| 87 | |
| 88 | return true; |
| 89 | } |
| 90 | |
| 91 | return false; |
| 92 | } |
| 93 | |
| 94 | /* |
| 95 | * To get a callbase instruction by given a function name, a basic block |
nothing calls this directly
no test coverage detected