Remove trailing whitespace
[oota-llvm.git] / lib / Analysis / IPA / PrintSCC.cpp
index e4af831752c9381d2d48189c9dfa0e388485809e..c0adf5ca0342577970a8b87771eb9a66cc807140 100644 (file)
@@ -1,10 +1,10 @@
 //===- PrintSCC.cpp - Enumerate SCCs in some key graphs -------------------===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file provides passes to print out SCCs in a CFG or a CallGraph.
 //       analyze -cfgscc            to print the SCCs in each CFG of a module.
 //       analyze -cfgscc -stats     to print the #SCCs and the maximum SCC size.
 //       analyze -cfgscc -debug > /dev/null to watch the algorithm in action.
-// 
+//
 //     and similarly:
 //       analyze -callscc [-stats] [-debug] to print SCCs in the CallGraph
-// 
+//
 // (3) To test the scc_iterator.
 //
 //===----------------------------------------------------------------------===//
 #include "llvm/Support/CFG.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