Remove warnings about unused parameters and shadowed variables.
[oota-llvm.git] / include / llvm / Analysis / IntervalPartition.h
index 45e282acdfd5b8f2dc72abbd1588a2bfa830848c..793f7d5c27ad2f71add07f9b95d39fbfa767a17b 100644 (file)
@@ -1,10 +1,10 @@
 //===- IntervalPartition.h - Interval partition Calculation -----*- C++ -*-===//
-// 
+//
 //                     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 is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
 //===----------------------------------------------------------------------===//
 //
 // This file contains the declaration of the IntervalPartition class, which
@@ -25,6 +25,9 @@
 
 #include "llvm/Analysis/Interval.h"
 #include "llvm/Pass.h"
+#include <map>
+
+namespace llvm {
 
 //===----------------------------------------------------------------------===//
 //
@@ -43,7 +46,9 @@ class IntervalPartition : public FunctionPass {
   std::vector<Interval*> Intervals;
 
 public:
-  IntervalPartition() : RootInterval(0) {}
+  static char ID; // Pass identification, replacement for typeid
+
+  IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
 
   // run - Calculate the interval partition for this function
   virtual bool runOnFunction(Function &F);
@@ -58,7 +63,10 @@ public:
   ~IntervalPartition() { destroy(); }
 
   // print - Show contents in human readable format...
-  virtual void print(std::ostream &O) const;
+  virtual void print(std::ostream &O, const Module* = 0) const;
+  void print(std::ostream *O, const Module* M = 0) const {
+    if (O) print(*O, M);
+  }
 
   // getRootInterval() - Return the root interval that contains the starting
   // block of the function.
@@ -102,4 +110,6 @@ private:
   void updatePredecessors(Interval *Int);
 };
 
+} // End llvm namespace
+
 #endif