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 | 68d033cc94d64c49aa442b3990386f95f95d5637 (patch) | |
tree | 8c13a0e20fb07325bf947903aa7b9259ba913de1 /tools/opt/PrintSCC.cpp | |
parent | ded6d0c9fb8ac74b1db12dc0dea6fb81286f4e04 (diff) | |
download | external_llvm-68d033cc94d64c49aa442b3990386f95f95d5637.zip external_llvm-68d033cc94d64c49aa442b3990386f95f95d5637.tar.gz external_llvm-68d033cc94d64c49aa442b3990386f95f95d5637.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/PrintSCC.cpp')
-rw-r--r-- | tools/opt/PrintSCC.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index e4af831..5fe1eec 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/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 |