Get rid of idefs for arguments
[oota-llvm.git] / lib / Analysis / IPA / PrintSCC.cpp
index 8911cc36e2234b656d7ea609430626564252d30f..d37c4caa836186ea6c51e8ce7dfd85932da3d1a1 100644 (file)
 #include "llvm/Module.h"
 #include "llvm/Analysis/CallGraph.h"
 #include "llvm/Support/CFG.h"
-#include "Support/SCCIterator.h"
+#include "llvm/ADT/SCCIterator.h"
 #include <iostream>
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   struct CFGSCC : public FunctionPass {
     bool runOnFunction(Function& func);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
     }
   };
 
-  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 { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     // getAnalysisUsage - This pass requires the CallGraph.
     virtual void getAnalysisUsage(AnalysisUsage &AU) 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