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

Method isFilePath

lib/inputanalysis/DefMapGenerator.cpp:601–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601bool DefMapGenerator::isFilePath(
602 ASTIRNode &Node, const FilePathAnalysisReport &FilePathReport) const {
603 auto Def = Node.IR.getDefinition();
604 auto *CB = dyn_cast_or_null<llvm::CallBase>(Def.first);
605 if (!CB || Def.second == -1)
606 return false;
607
608 auto *F = util::getCalledFunction(*CB);
609 if (!F)
610 return false;
611
612 auto FuncName = F->getName().str();
613 return FilePathReport.has(FuncName, Def.second) &&
614 FilePathReport.get(FuncName, Def.second);
615}
616
617void DefMapGenerator::updateDefinitions(
618 const std::map<unsigned, std::set<unsigned>> &ArrayIDMap,

Callers

nothing calls this directly

Calls 5

getCalledFunctionFunction · 0.85
getDefinitionMethod · 0.80
getNameMethod · 0.45
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected