[reg scavenger] Fix the isUsed/isAliasUsed functions so as to not report a false
[oota-llvm.git] / include / llvm / CodeGen / MachineFunctionPass.h
index 60460afae7a8623da01be475da54de5e1a1de878..b7bf0a36c44737064a98e20a45d2afee45cc870b 100644 (file)
 #define LLVM_CODEGEN_MACHINE_FUNCTION_PASS_H
 
 #include "llvm/Pass.h"
-#include "llvm/CodeGen/MachineFunction.h"
 
 namespace llvm {
 
+class MachineFunction;
+
 /// MachineFunctionPass - This class adapts the FunctionPass interface to
 /// allow convenient creation of passes that operate on the MachineFunction
 /// representation. Instead of overriding runOnFunction, subclasses
 /// override runOnMachineFunction.
 class MachineFunctionPass : public FunctionPass {
 protected:
-  explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
-  explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {}
+  explicit MachineFunctionPass(char &ID) : FunctionPass(ID) {}
 
   /// runOnMachineFunction - This method must be overloaded to perform the
   /// desired machine code transformation or analysis.
@@ -47,7 +47,11 @@ protected:
   virtual void getAnalysisUsage(AnalysisUsage &AU) const;
 
 private:
-  bool runOnFunction(Function &F);
+  /// createPrinterPass - Get a machine function printer pass.
+  virtual Pass *createPrinterPass(raw_ostream &O,
+                                  const std::string &Banner) const;
+
+  virtual bool runOnFunction(Function &F);
 };
 
 } // End llvm namespace