Adding a collector name attribute to Function in the IR. These
[oota-llvm.git] / include / llvm / CodeGen / MachineFunctionPass.h
index 77af52a34748f47c3a54c13e2857e3f77fcba5d5..f90c696738f6083d0976bab9ef64eb8bc541d9b7 100644 (file)
@@ -26,17 +26,22 @@ namespace llvm {
 
 struct MachineFunctionPass : public FunctionPass {
 
+  explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+
+protected:
   /// runOnMachineFunction - This method must be overloaded to perform the
   /// desired machine code transformation or analysis.
   ///
   virtual bool runOnMachineFunction(MachineFunction &MF) = 0;
 
+public:
   // FIXME: This pass should declare that the pass does not invalidate any LLVM
   // passes.
-  virtual bool runOnFunction(Function &F) {
+  bool runOnFunction(Function &F) {
     return runOnMachineFunction(MachineFunction::get(&F));
   }
   
+private:
   virtual void virtfn();  // out of line virtual fn to give class a home.
 };