[llvm-commits] [llvm] r37924 - /llvm/trunk/include/llvm/CodeGen/MachineFunctionPass.h
Dan Gohman
djg at cray.com
Thu Jul 5 13:39:36 PDT 2007
Author: djg
Date: Thu Jul 5 15:39:35 2007
New Revision: 37924
URL: http://llvm.org/viewvc/llvm-project?rev=37924&view=rev
Log:
Make MachineFunctionPass::runOnFunction non-virtual. Subclasses override
the virtual function runOnMachineFunction instead. And add access specifiers.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineFunctionPass.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunctionPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunctionPass.h?rev=37924&r1=37923&r2=37924&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunctionPass.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunctionPass.h Thu Jul 5 15:39:35 2007
@@ -28,17 +28,20 @@
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.
};
More information about the llvm-commits
mailing list