| 17 | class TestIndCallSolverMgr : public TestBase { |
| 18 | protected: |
| 19 | bool found(IndCallSolverMgr &Solver, std::string FuncName, unsigned BIdx, |
| 20 | unsigned IIdx, std::set<std::string> Answers) { |
| 21 | auto *CB = llvm::dyn_cast_or_null<llvm::CallBase>( |
| 22 | IRAH->getInstruction(FuncName, BIdx, IIdx)); |
| 23 | if (!CB) |
| 24 | return false; |
| 25 | |
| 26 | auto Result = Solver.getCalledFunctions(*CB); |
| 27 | if (Result.size() != Answers.size()) |
| 28 | return false; |
| 29 | |
| 30 | for (const auto *F : Result) { |
| 31 | if (!F) |
| 32 | return false; |
| 33 | |
| 34 | if (Answers.find(F->getName()) == Answers.end()) |
| 35 | return false; |
| 36 | } |
| 37 | |
| 38 | return true; |
| 39 | } |
| 40 | |
| 41 | bool notfound(IndCallSolverMgr &Solver, std::string FuncName, unsigned BIdx, |
| 42 | unsigned IIdx) { |
nothing calls this directly
no test coverage detected