Add an out-of-line virtual function to home class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-07-14 23:08:47 +00:00
parent a3b5939caa
commit efb9b813fa
2 changed files with 4 additions and 1 deletions

View File

@ -33,10 +33,11 @@ struct MachineFunctionPass : public FunctionPass {
// FIXME: This pass should declare that the pass does not invalidate any LLVM
// passes.
virtual bool runOnFunction(Function &F) {
return runOnMachineFunction(MachineFunction::get(&F));
}
virtual void virtfn(); // out of line virtual fn to give class a home.
};
} // End llvm namespace

View File

@ -38,6 +38,8 @@ using namespace llvm;
static AnnotationID MF_AID(
AnnotationManager::getID("CodeGen::MachineCodeForFunction"));
// Out of line virtual function to home classes.
void MachineFunctionPass::virtfn() {}
namespace {
struct VISIBILITY_HIDDEN Printer : public MachineFunctionPass {