Make replaceMachineCodeForFunction return void.
authorBrian Gaeke <gaeke@uiuc.edu>
Mon, 20 Oct 2003 15:15:17 +0000 (15:15 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Mon, 20 Oct 2003 15:15:17 +0000 (15:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9288 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9CodeEmitter.cpp
lib/Target/X86/X86TargetMachine.cpp

index 469b3a230c56301374979e53dc3cebb22a1e9245..ccc20e4ff13d91b10cc1cbf98737b28548fa26be 100644 (file)
@@ -562,12 +562,11 @@ inline void SparcV9CodeEmitter::emitFarCall(uint64_t Target, Function *F) {
   }
 }
 
-bool UltraSparc::replaceMachineCodeForFunction (void *Old, void *New) {
+void UltraSparc::replaceMachineCodeForFunction (void *Old, void *New) {
   if (!TheJITResolver) return true; // fail if not in JIT.
   uint64_t Target = (uint64_t)(intptr_t)New;
   uint64_t CodeBegin = (uint64_t)(intptr_t)Old;
   TheJITResolver->insertJumpAtAddr(Target, CodeBegin);
-  return false;
 }
 
 int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
index 74b0936d85d1f21445c6bca5a52ab7312889cffd..3e4ef1cd71733f59d9c0cd9f0e66b0550072c006 100644 (file)
@@ -137,7 +137,7 @@ bool X86TargetMachine::addPassesToJITCompile(FunctionPassManager &PM) {
   return false; // success!
 }
 
-bool X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
+void X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
   // FIXME: This code could perhaps live in a more appropriate place.
   char *OldByte = (char *) Old;
   *OldByte++ = 0xE9;                // Emit JMP opcode.
@@ -145,5 +145,4 @@ bool X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
   int32_t NewAddr = (int32_t) New;
   int32_t OldAddr = (int32_t) OldWord;
   *OldWord = NewAddr - OldAddr - 4; // Emit PC-relative addr of New code.
-  return false;                     // success!
 }