diff options
-rw-r--r-- | lib/Analysis/IPA/PrintSCC.cpp | 11 | ||||
-rw-r--r-- | tools/analyze/PrintSCC.cpp | 11 | ||||
-rw-r--r-- | tools/opt/PrintSCC.cpp | 11 |
3 files changed, 12 insertions, 21 deletions
diff --git a/lib/Analysis/IPA/PrintSCC.cpp b/lib/Analysis/IPA/PrintSCC.cpp index e4af831752..5fe1eecde2 100644 --- a/lib/Analysis/IPA/PrintSCC.cpp +++ b/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 diff --git a/tools/analyze/PrintSCC.cpp b/tools/analyze/PrintSCC.cpp index e4af831752..5fe1eecde2 100644 --- a/tools/analyze/PrintSCC.cpp +++ b/tools/analyze/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 diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index e4af831752..5fe1eecde2 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 |