diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineFunctionPass.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunctionPass.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h index 6f7c216382..6b5e64abc4 100644 --- a/include/llvm/CodeGen/MachineFunctionPass.h +++ b/include/llvm/CodeGen/MachineFunctionPass.h @@ -24,25 +24,19 @@ namespace llvm { -/// 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: + // FIXME: This pass should declare that the pass does not invalidate any LLVM + // passes. +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; - /// getAnalysisUsage - Subclasses that override getAnalysisUsage - /// must call this. - virtual void getAnalysisUsage(AnalysisUsage &AU) const; - -private: +public: bool runOnFunction(Function &F); }; |