diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-11-27 01:32:17 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-11-27 01:32:17 +0000 |
commit | 16f56b4c23a7679da6f52d3b3a84f92599977e0f (patch) | |
tree | 3f0cff6cdfee82529717a0d968741132fb671b38 /llvm/tools/opt/PrintSCC.cpp | |
parent | 4a4f72d8d9246c8e2ef8c492b2ea3d0fce2d33b7 (diff) | |
download | bcm5719-llvm-16f56b4c23a7679da6f52d3b3a84f92599977e0f.tar.gz bcm5719-llvm-16f56b4c23a7679da6f52d3b3a84f92599977e0f.zip |
[PM] Remove the underspecified 'getRoot' method from CallGraph. It's
only user was an ancient SCC printing bit of the opt tool which really
should be walking the call graph the same way the CGSCC pass manager
does.
llvm-svn: 195800
Diffstat (limited to 'llvm/tools/opt/PrintSCC.cpp')
-rw-r--r-- | llvm/tools/opt/PrintSCC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/opt/PrintSCC.cpp b/llvm/tools/opt/PrintSCC.cpp index 348b5f21ce4..9322cbceec3 100644 --- a/llvm/tools/opt/PrintSCC.cpp +++ b/llvm/tools/opt/PrintSCC.cpp @@ -92,11 +92,11 @@ bool CFGSCC::runOnFunction(Function &F) { // run - Print out SCCs in the call graph for the specified module. bool CallGraphSCC::runOnModule(Module &M) { - CallGraphNode *rootNode = getAnalysis<CallGraphWrapperPass>().getRoot(); + CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph(); unsigned sccNum = 0; errs() << "SCCs for the program in PostOrder:"; - for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), - E = scc_end(rootNode); SCCI != E; ++SCCI) { + for (scc_iterator<CallGraph*> SCCI = scc_begin(&CG), + E = scc_end(&CG); SCCI != E; ++SCCI) { const std::vector<CallGraphNode*> &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(), |