From: Chris Lattner Date: Fri, 14 Jul 2006 23:08:47 +0000 (+0000) Subject: Add an out-of-line virtual function to home class. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=efb9b813fa74d3134dd185df10f6577ceab72bcd;p=oota-llvm.git 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 --- diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h index 973babd702a..77af52a3474 100644 --- a/include/llvm/CodeGen/MachineFunctionPass.h +++ b/include/llvm/CodeGen/MachineFunctionPass.h @@ -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 diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 05e863be750..6a36c4a58c5 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -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 {