Index: clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp +++ clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp @@ -265,7 +265,7 @@ for (llvm::scc_iterator 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); } Index: llvm/include/llvm/ADT/SCCIterator.h =================================================================== --- llvm/include/llvm/ADT/SCCIterator.h +++ llvm/include/llvm/ADT/SCCIterator.h @@ -124,11 +124,11 @@ 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. @@ -212,7 +212,7 @@ } template -bool scc_iterator::hasLoop() const { +bool scc_iterator::hasCycle() const { assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); if (CurrentSCC.size() > 1) return true; Index: llvm/lib/IR/ModuleSummaryIndex.cpp =================================================================== --- llvm/lib/IR/ModuleSummaryIndex.cpp +++ llvm/lib/IR/ModuleSummaryIndex.cpp @@ -300,7 +300,7 @@ if (V.getSummaryList().size()) F = cast(V.getSummaryList().front().get()); O << " " << (F == nullptr ? "External" : "") << " " << utostr(V.getGUID()) - << (I.hasLoop() ? " (has loop)" : "") << "\n"; + << (I.hasCycle() ? " (has cycle)" : "") << "\n"; } O << "}\n"; } Index: llvm/tools/opt/PrintSCC.cpp =================================================================== --- llvm/tools/opt/PrintSCC.cpp +++ llvm/tools/opt/PrintSCC.cpp @@ -79,8 +79,8 @@ for (std::vector::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) errs() << (*I)->getName() << ", "; - if (nextSCC.size() == 1 && SCCI.hasLoop()) - errs() << " (Has self-loop)."; + if (nextSCC.size() == 1 && SCCI.hasCycle()) + errs() << " (Has self-cycle)."; } errs() << "\n"; @@ -101,8 +101,8 @@ E = nextSCC.end(); I != E; ++I) errs() << ((*I)->getFunction() ? (*I)->getFunction()->getName() : "external node") << ", "; - if (nextSCC.size() == 1 && SCCI.hasLoop()) - errs() << " (Has self-loop)."; + if (nextSCC.size() == 1 && SCCI.hasCycle()) + errs() << " (Has self-cycle)."; } errs() << "\n";