Allow const functions
authorChris Lattner <sabre@nondot.org>
Fri, 9 May 2003 03:27:41 +0000 (03:27 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 9 May 2003 03:27:41 +0000 (03:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6056 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineCodeEmitter.h
lib/CodeGen/MachineCodeEmitter.cpp

index d3e2414f15598463053ca18f6a1a345cac65d23a..5c4802eacdc8b10271ae59261c312b5390d83514 100644 (file)
@@ -45,12 +45,12 @@ struct MachineCodeEmitter {
   /// specifies the total size required by the stub.  Stubs are not allowed to
   /// have constant pools, the can only use the other emit* methods.
   ///
-  virtual void startFunctionStub(Function &F, unsigned StubSize) {}
+  virtual void startFunctionStub(const Function &F, unsigned StubSize) {}
 
   /// finishFunctionStub - This callback is invoked to terminate a function
   /// stub.
   ///
-  virtual void finishFunctionStub(Function &F) {}
+  virtual void *finishFunctionStub(const Function &F) { return 0; }
 
   /// emitByte - This callback is invoked when a byte needs to be written to the
   /// output stream.
index 270a7b9038999652ced239945c87b64d869a67ef..d91efe2cc1b5bcf8d99c5815410e3006876c9a00 100644 (file)
@@ -22,11 +22,12 @@ namespace {
       std::cout << "\n--- Basic Block: " << BB.getBasicBlock()->getName()<<"\n";
     }
 
-    void startFunctionStub(Function &F, unsigned StubSize) {
+    void startFunctionStub(const Function &F, unsigned StubSize) {
       std::cout << "\n--- Function stub for function: " << F.getName() << "\n";
     }
-    void finishFunctionStub(Function &F) {
+    void *finishFunctionStub(const Function &F) {
       std::cout << "\n";
+      return 0;
     }
     
     void emitByte(unsigned char B) {