summaryrefslogtreecommitdiff
path: root/tools/opt
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-11-27 01:32:17 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-11-27 01:32:17 +0000
commitdf13080481502547340a60e9539cc041ef84e41a (patch)
treef839996fc91da82ce12367b12e516b4da0dc5762 /tools/opt
parent823c9c725d23f7c57e82b004ad8a011dd6dc6603 (diff)
downloadllvm-df13080481502547340a60e9539cc041ef84e41a.tar.gz
llvm-df13080481502547340a60e9539cc041ef84e41a.tar.bz2
llvm-df13080481502547340a60e9539cc041ef84e41a.tar.xz
[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
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/PrintSCC.cpp6
1 files changed, 3 insertions, 3 deletions
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<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(),