Loading clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ void NoRecursionCheck::check(const MatchFinder::MatchResult &Result) { for (llvm::scc_iterator<CallGraph *> SCCI = llvm::scc_begin(&CG), SCCE = llvm::scc_end(&CG); SCCI != SCCE; ++SCCI) { if (!SCCI.hasLoop()) // We only care about cycles, not standalone nodes. if (!SCCI.hasCycle()) // We only care about cycles, not standalone nodes. continue; handleSCC(*SCCI); } Loading llvm/include/llvm/ADT/SCCIterator.h +4 −4 Original line number Diff line number Diff line Loading @@ -124,11 +124,11 @@ public: return CurrentSCC; } /// Test if the current SCC has a loop. /// Test if the current SCC has a cycle. /// /// If the SCC has more than one node, this is trivially true. If not, it may /// still contain a loop if the node has an edge back to itself. bool hasLoop() const; /// still contain a cycle if the node has an edge back to itself. bool hasCycle() const; /// This informs the \c scc_iterator that the specified \c Old node /// has been deleted, and \c New is to be used in its place. Loading Loading @@ -212,7 +212,7 @@ template <class GraphT, class GT> void scc_iterator<GraphT, GT>::GetNextSCC() { } template <class GraphT, class GT> bool scc_iterator<GraphT, GT>::hasLoop() const { bool scc_iterator<GraphT, GT>::hasCycle() const { assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); if (CurrentSCC.size() > 1) return true; Loading llvm/lib/IR/ModuleSummaryIndex.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ void ModuleSummaryIndex::dumpSCCs(raw_ostream &O) { if (V.getSummaryList().size()) F = cast<FunctionSummary>(V.getSummaryList().front().get()); O << " " << (F == nullptr ? "External" : "") << " " << utostr(V.getGUID()) << (I.hasLoop() ? " (has loop)" : "") << "\n"; << (I.hasCycle() ? " (has cycle)" : "") << "\n"; } O << "}\n"; } Loading llvm/tools/opt/PrintSCC.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ bool CFGSCC::runOnFunction(Function &F) { for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) errs() << (*I)->getName() << ", "; if (nextSCC.size() == 1 && SCCI.hasLoop()) if (nextSCC.size() == 1 && SCCI.hasCycle()) errs() << " (Has self-loop)."; } errs() << "\n"; Loading @@ -101,7 +101,7 @@ bool CallGraphSCC::runOnModule(Module &M) { E = nextSCC.end(); I != E; ++I) errs() << ((*I)->getFunction() ? (*I)->getFunction()->getName() : "external node") << ", "; if (nextSCC.size() == 1 && SCCI.hasLoop()) if (nextSCC.size() == 1 && SCCI.hasCycle()) errs() << " (Has self-loop)."; } errs() << "\n"; Loading Loading
clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ void NoRecursionCheck::check(const MatchFinder::MatchResult &Result) { for (llvm::scc_iterator<CallGraph *> SCCI = llvm::scc_begin(&CG), SCCE = llvm::scc_end(&CG); SCCI != SCCE; ++SCCI) { if (!SCCI.hasLoop()) // We only care about cycles, not standalone nodes. if (!SCCI.hasCycle()) // We only care about cycles, not standalone nodes. continue; handleSCC(*SCCI); } Loading
llvm/include/llvm/ADT/SCCIterator.h +4 −4 Original line number Diff line number Diff line Loading @@ -124,11 +124,11 @@ public: return CurrentSCC; } /// Test if the current SCC has a loop. /// Test if the current SCC has a cycle. /// /// If the SCC has more than one node, this is trivially true. If not, it may /// still contain a loop if the node has an edge back to itself. bool hasLoop() const; /// still contain a cycle if the node has an edge back to itself. bool hasCycle() const; /// This informs the \c scc_iterator that the specified \c Old node /// has been deleted, and \c New is to be used in its place. Loading Loading @@ -212,7 +212,7 @@ template <class GraphT, class GT> void scc_iterator<GraphT, GT>::GetNextSCC() { } template <class GraphT, class GT> bool scc_iterator<GraphT, GT>::hasLoop() const { bool scc_iterator<GraphT, GT>::hasCycle() const { assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); if (CurrentSCC.size() > 1) return true; Loading
llvm/lib/IR/ModuleSummaryIndex.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ void ModuleSummaryIndex::dumpSCCs(raw_ostream &O) { if (V.getSummaryList().size()) F = cast<FunctionSummary>(V.getSummaryList().front().get()); O << " " << (F == nullptr ? "External" : "") << " " << utostr(V.getGUID()) << (I.hasLoop() ? " (has loop)" : "") << "\n"; << (I.hasCycle() ? " (has cycle)" : "") << "\n"; } O << "}\n"; } Loading
llvm/tools/opt/PrintSCC.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ bool CFGSCC::runOnFunction(Function &F) { for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) errs() << (*I)->getName() << ", "; if (nextSCC.size() == 1 && SCCI.hasLoop()) if (nextSCC.size() == 1 && SCCI.hasCycle()) errs() << " (Has self-loop)."; } errs() << "\n"; Loading @@ -101,7 +101,7 @@ bool CallGraphSCC::runOnModule(Module &M) { E = nextSCC.end(); I != E; ++I) errs() << ((*I)->getFunction() ? (*I)->getFunction()->getName() : "external node") << ", "; if (nextSCC.size() == 1 && SCCI.hasLoop()) if (nextSCC.size() == 1 && SCCI.hasCycle()) errs() << " (Has self-loop)."; } errs() << "\n"; Loading