diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-20 04:44:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-20 04:44:31 +0000 |
commit | 135419193e4dbfceb809a0ebc9c54599493fdfcd (patch) | |
tree | 37f7e5a7d784dad959ae002b4924818685ddae18 | |
parent | cd671065be2cbe40f6d96a4f016baf778673b4ea (diff) | |
download | bcm5719-llvm-135419193e4dbfceb809a0ebc9c54599493fdfcd.tar.gz bcm5719-llvm-135419193e4dbfceb809a0ebc9c54599493fdfcd.zip |
Finegrainify namespacification
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16434
-rw-r--r-- | llvm/lib/Analysis/IPA/PrintSCC.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/IPA/PrintSCC.cpp b/llvm/lib/Analysis/IPA/PrintSCC.cpp index e4af831752c..5fe1eecde2b 100644 --- a/llvm/lib/Analysis/IPA/PrintSCC.cpp +++ b/llvm/lib/Analysis/IPA/PrintSCC.cpp @@ -31,8 +31,7 @@ #include "llvm/Support/CFG.h" #include "llvm/ADT/SCCIterator.h" #include <iostream> - -namespace llvm { +using namespace llvm; namespace { struct CFGSCC : public FunctionPass { @@ -45,9 +44,9 @@ namespace { } }; - struct CallGraphSCC : public Pass { + struct CallGraphSCC : public ModulePass { // run - Print out SCCs in the call graph for the specified module. - bool run(Module &M); + bool runOnModule(Module &M); void print(std::ostream &O) const { } @@ -85,7 +84,7 @@ bool CFGSCC::runOnFunction(Function &F) { // run - Print out SCCs in the call graph for the specified module. -bool CallGraphSCC::run(Module &M) { +bool CallGraphSCC::runOnModule(Module &M) { CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot(); unsigned sccNum = 0; std::cout << "SCCs for the program in PostOrder:"; @@ -104,5 +103,3 @@ bool CallGraphSCC::run(Module &M) { return true; } - -} // End llvm namespace |