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

Method found

tests/indcallsolver/TestIndCallSolver.cpp:159–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157class TestIndCallSolverBase : public TestBase {
158protected:
159 bool found(IndCallSolver &Solver, std::string FuncName, unsigned BIdx,
160 unsigned IIdx, std::set<std::string> Answers) {
161 const auto *CB = llvm::dyn_cast_or_null<CallBase>(
162 IRAH->getInstruction(FuncName, BIdx, IIdx));
163 if (!CB)
164 return false;
165
166 auto Result = Solver.solve(*CB);
167 if (Result.size() != Answers.size())
168 return false;
169
170 for (const auto *F : Result) {
171 if (!F)
172 return false;
173
174 if (Answers.find(F->getName()) == Answers.end())
175 return false;
176 }
177 return true;
178 }
179
180 template <typename T> void prepare(T &Handler) {
181 LLVMWalker Walker;

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected