diff options
Diffstat (limited to 'llvm/tools/opt/PrintSCC.cpp')
-rw-r--r-- | llvm/tools/opt/PrintSCC.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/tools/opt/PrintSCC.cpp b/llvm/tools/opt/PrintSCC.cpp index 419886d6cc60..1ca52745ff40 100644 --- a/llvm/tools/opt/PrintSCC.cpp +++ b/llvm/tools/opt/PrintSCC.cpp @@ -76,10 +76,11 @@ bool CFGSCC::runOnFunction(Function &F) { for (scc_iterator<Function*> SCCI = scc_begin(&F); !SCCI.isAtEnd(); ++SCCI) { const std::vector<BasicBlock *> &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; - for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(), - E = nextSCC.end(); I != E; ++I) - errs() << (*I)->getName() << ", "; - if (nextSCC.size() == 1 && SCCI.hasLoop()) + for (BasicBlock *BB : nextSCC) { + BB->printAsOperand(errs(), false); + errs() << ", "; + } + if (nextSCC.size() == 1 && SCCI.hasCycle()) errs() << " (Has self-loop)."; } errs() << "\n"; @@ -101,7 +102,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"; |