[llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h

Brian Gaeke gaeke at cs.uiuc.edu
Mon Oct 20 10:15:03 PDT 2003


Changes in directory llvm/include/llvm/Target:

TargetMachine.h updated: 1.36 -> 1.37

---
Log message:

Make replaceMachineCodeForFunction return void.
Make it assert by default.


---
Diffs of the changes:  (+6 -4)

Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.36 llvm/include/llvm/Target/TargetMachine.h:1.37
--- llvm/include/llvm/Target/TargetMachine.h:1.36	Fri Oct 17 13:26:45 2003
+++ llvm/include/llvm/Target/TargetMachine.h	Mon Oct 20 10:14:33 2003
@@ -8,6 +8,7 @@
 #define LLVM_TARGET_TARGETMACHINE_H
 
 #include "llvm/Target/TargetData.h"
+#include <cassert>
 
 class TargetInstrInfo;
 class TargetInstrDescriptor;
@@ -100,11 +101,12 @@
   }
 
   /// 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");
   }
 };
 





More information about the llvm-commits mailing list