| 64 | } |
| 65 | |
| 66 | std::set<FunctionHandle> CallGraph::recursiveFunctions() const |
| 67 | { |
| 68 | CallGraphCycleFinder cycleFinder{*this}; |
| 69 | // Visiting the root only is not enough, since there may be disconnected recursive functions. |
| 70 | for (auto const& call: functionCalls) |
| 71 | cycleFinder.visit(call.first); |
| 72 | return cycleFinder.containedInCycle; |
| 73 | } |
| 74 | |
| 75 | CallGraph CallGraphGenerator::callGraph(Block const& _ast) |
| 76 | { |