| 3 | namespace ftg { |
| 4 | |
| 5 | void LoopAnalysisReport::add(ArgFlow &AF, std::vector<int> Indices) { |
| 6 | LoopAnalysisResult Result = {AF.LoopExit, AF.LoopDepth}; |
| 7 | set(AF.getLLVMArg(), Result, Indices); |
| 8 | |
| 9 | auto SI = AF.getStructInfo(); |
| 10 | if (!SI) |
| 11 | return; |
| 12 | for (auto Iter : SI->FieldResults) { |
| 13 | if (!Iter.second) |
| 14 | continue; |
| 15 | |
| 16 | Indices.push_back(Iter.first); |
| 17 | add(*Iter.second, Indices); |
| 18 | Indices.pop_back(); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | bool LoopAnalysisReport::fromJson(Json::Value Report) { |
| 23 | try { |
no test coverage detected