Start adding to the meat of MachineCodeEmitter
authorChris Lattner <sabre@nondot.org>
Mon, 2 Dec 2002 21:44:13 +0000 (21:44 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 2 Dec 2002 21:44:13 +0000 (21:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4869 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineCodeEmitter.h

index 2e8908343c93ac0efcb0822b414952bb381a398d..69eea5c972d5c0e19a172a69c52848736a5c8d2f 100644 (file)
 #ifndef LLVM_CODEGEN_MACHINE_CODE_EMITTER_H
 #define LLVM_CODEGEN_MACHINE_CODE_EMITTER_H
 
-struct MachineCodeEmitter {
+class MachineFunction;
+class MachineBasicBlock;
 
+struct MachineCodeEmitter {
 
+  /// startFunction - This callback is invoked when the specified function is
+  /// about to be code generated.
+  ///
+  virtual void startFunction(MachineFunction &F) {}
   
+  /// finishFunction - This callback is invoked when the specified function has
+  /// finished code generation.
+  ///
+  virtual void finishFunction(MachineFunction &F) {}
+
+  /// startBasicBlock - This callback is invoked when a new basic block is about
+  /// to be emitted.
+  ///
+  virtual void startBasicBlock(MachineBasicBlock &BB) {}
 
+  /// emitByte - This callback is invoked when a byte needs to be written to the
+  /// output stream.
+  virtual void emitByte(unsigned char B) {}
 };
 
 #endif