| 772 | } |
| 773 | |
| 774 | bool 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 | |
| 791 | std::set<size_t> RDAnalyzer::getOutParamIndices(CallBase &CB) const { |
| 792 | std::set<size_t> Result; |
nothing calls this directly
no test coverage detected