From df13080481502547340a60e9539cc041ef84e41a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 27 Nov 2013 01:32:17 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195800 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/PrintSCC.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/opt') diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index 348b5f21ce..9322cbceec 100644 --- a/tools/opt/PrintSCC.cpp +++ b/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().getRoot(); + CallGraph &CG = getAnalysis().getCallGraph(); unsigned sccNum = 0; errs() << "SCCs for the program in PostOrder:"; - for (scc_iterator SCCI = scc_begin(rootNode), - E = scc_end(rootNode); SCCI != E; ++SCCI) { + for (scc_iterator SCCI = scc_begin(&CG), + E = scc_end(&CG); SCCI != E; ++SCCI) { const std::vector &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector::const_iterator I = nextSCC.begin(), -- cgit v1.2.3