MCPcopy Create free account
hub / github.com/Samsung/UTopia / found

Method found

tests/indcallsolver/TestIndCallSolver.cpp:19–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17class TestIndCallSolverMgr : public TestBase {
18protected:
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) {

Callers

nothing calls this directly

Calls 6

getInstructionMethod · 0.80
getCalledFunctionsMethod · 0.80
sizeMethod · 0.80
endMethod · 0.80
findMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected