summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/PrintSCC.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-20 01:03:44 +0000
committerDan Gohman <gohman@apple.com>2010-08-20 01:03:44 +0000
commitd3ee4238a5ecf16f1e871ad13c4b84aa86c9c1f6 (patch)
tree338d2c79d030734002a311439b0cb414a7cd2c1d /llvm/tools/opt/PrintSCC.cpp
parentd0ef0eff61eee004f08ef5add8a3f958d08698b7 (diff)
downloadbcm5719-llvm-d3ee4238a5ecf16f1e871ad13c4b84aa86c9c1f6.tar.gz
bcm5719-llvm-d3ee4238a5ecf16f1e871ad13c4b84aa86c9c1f6.zip
Make the SCC printing passes use errs() instead of outs(), as the
other printing passes do, and update the documentation accordingly. llvm-svn: 111601
Diffstat (limited to 'llvm/tools/opt/PrintSCC.cpp')
-rw-r--r--llvm/tools/opt/PrintSCC.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/tools/opt/PrintSCC.cpp b/llvm/tools/opt/PrintSCC.cpp
index ba58a43d3b6..533f49ec2a8 100644
--- a/llvm/tools/opt/PrintSCC.cpp
+++ b/llvm/tools/opt/PrintSCC.cpp
@@ -73,18 +73,18 @@ Z("print-callgraph-sccs", "Print SCCs of the Call Graph");
bool CFGSCC::runOnFunction(Function &F) {
unsigned sccNum = 0;
- outs() << "SCCs for Function " << F.getName() << " in PostOrder:";
+ errs() << "SCCs for Function " << F.getName() << " in PostOrder:";
for (scc_iterator<Function*> SCCI = scc_begin(&F),
E = scc_end(&F); SCCI != E; ++SCCI) {
std::vector<BasicBlock*> &nextSCC = *SCCI;
- outs() << "\nSCC #" << ++sccNum << " : ";
+ errs() << "\nSCC #" << ++sccNum << " : ";
for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(),
E = nextSCC.end(); I != E; ++I)
- outs() << (*I)->getName() << ", ";
+ errs() << (*I)->getName() << ", ";
if (nextSCC.size() == 1 && SCCI.hasLoop())
- outs() << " (Has self-loop).";
+ errs() << " (Has self-loop).";
}
- outs() << "\n";
+ errs() << "\n";
return true;
}
@@ -94,19 +94,19 @@ bool CFGSCC::runOnFunction(Function &F) {
bool CallGraphSCC::runOnModule(Module &M) {
CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
unsigned sccNum = 0;
- outs() << "SCCs for the program in PostOrder:";
+ errs() << "SCCs for the program in PostOrder:";
for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode),
E = scc_end(rootNode); SCCI != E; ++SCCI) {
const std::vector<CallGraphNode*> &nextSCC = *SCCI;
- outs() << "\nSCC #" << ++sccNum << " : ";
+ errs() << "\nSCC #" << ++sccNum << " : ";
for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
E = nextSCC.end(); I != E; ++I)
- outs() << ((*I)->getFunction() ? (*I)->getFunction()->getNameStr()
+ errs() << ((*I)->getFunction() ? (*I)->getFunction()->getNameStr()
: std::string("external node")) << ", ";
if (nextSCC.size() == 1 && SCCI.hasLoop())
- outs() << " (Has self-loop).";
+ errs() << " (Has self-loop).";
}
- outs() << "\n";
+ errs() << "\n";
return true;
}
OpenPOWER on IntegriCloud