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

Method isOutParam

lib/rootdefanalysis/RDAnalyzer.cpp:774–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772}
773
774bool RDAnalyzer::isOutParam(const llvm::CallBase &CB, size_t ArgIdx) const {
775 const auto *F = CB.getCalledFunction();
776 if (!F || !F->isDeclaration())
777 return false;
778 if (CB.hasStructRetAttr() && ArgIdx == 0)
779 return true;
780
781 if (ArgIdx >= F->arg_size())
782 return false;
783
784 const auto *A = F->getArg(ArgIdx);
785 if (!A)
786 return false;
787
788 return Extension.isOutParam(*A);
789}
790
791std::set<size_t> RDAnalyzer::getOutParamIndices(CallBase &CB) const {
792 std::set<size_t> Result;

Callers

nothing calls this directly

Calls 2

getCalledFunctionMethod · 0.80
getArgMethod · 0.80

Tested by

no test coverage detected