diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-16 22:42:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-16 22:42:17 +0000 |
commit | 4422d31b843bb3c8bf2d294f45dcbb029d58b7af (patch) | |
tree | d58c7b71bf6c6e709818d91dc530e92af57c5a62 /llvm/tools/opt/opt.cpp | |
parent | b90b6f1a352e95a0cf50a48a82605cc275d6f061 (diff) | |
download | bcm5719-llvm-4422d31b843bb3c8bf2d294f45dcbb029d58b7af.tar.gz bcm5719-llvm-4422d31b843bb3c8bf2d294f45dcbb029d58b7af.zip |
introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>. No functionality change,
but now we have a much tidier interface.
llvm-svn: 101558
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 311f67173f3..ff19942ead8 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -141,15 +141,14 @@ struct CallGraphSCCPassPrinter : public CallGraphSCCPass { CallGraphSCCPassPrinter(const PassInfo *PI) : CallGraphSCCPass(&ID), PassToPrint(PI) {} - virtual bool runOnSCC(std::vector<CallGraphNode *>&SCC) { + virtual bool runOnSCC(CallGraphSCC &SCC) { if (!Quiet) { outs() << "Printing analysis '" << PassToPrint->getPassName() << "':\n"; - for (unsigned i = 0, e = SCC.size(); i != e; ++i) { - Function *F = SCC[i]->getFunction(); - if (F) { + for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I) { + Function *F = (*I)->getFunction(); + if (F) getAnalysisID<Pass>(PassToPrint).print(outs(), F->getParent()); - } } } // Get and print pass... |