From a42649e3dd4c8be2d45451429a41f2b13dbeeb78 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Mon, 20 Oct 2003 15:14:33 +0000 Subject: [PATCH] Make replaceMachineCodeForFunction return void. Make it assert by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9287 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetMachine.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index e8380f372d1..a40f7a1bd54 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -8,6 +8,7 @@ #define LLVM_TARGET_TARGETMACHINE_H #include "llvm/Target/TargetData.h" +#include class TargetInstrInfo; class TargetInstrDescriptor; @@ -100,11 +101,12 @@ public: } /// replaceMachineCodeForFunction - Make it so that calling the - /// function whose machine code is at OLD turns into a call to NEW. Returns - /// true iff an error occurred. FIXME: this is JIT-specific. + /// function whose machine code is at OLD turns into a call to NEW, + /// perhaps by overwriting OLD with a branch to NEW. FIXME: this is + /// JIT-specific. /// - virtual bool replaceMachineCodeForFunction (void *Old, void *New) { - return true; + virtual void replaceMachineCodeForFunction (void *Old, void *New) { + assert (0 && "Current target cannot replace machine code for functions"); } };