Eliminate the loop that searches through each of the operands
[oota-llvm.git] / include / llvm / CodeGen / MachineFunctionPass.h
index 77af52a34748f47c3a54c13e2857e3f77fcba5d5..95bb2bf510d52c0cfae8e8c9418b8dea285d1be7 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     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.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -26,17 +26,23 @@ namespace llvm {
 
 struct MachineFunctionPass : public FunctionPass {
 
+  explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+  explicit MachineFunctionPass(void *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.
 };