[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineCodeEmitter.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Dec 2 15:45:01 PST 2002
Changes in directory llvm/include/llvm/CodeGen:
MachineCodeEmitter.h updated: 1.1 -> 1.2
---
Log message:
Start adding to the meat of MachineCodeEmitter
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MachineCodeEmitter.h
diff -u llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.1 llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.2
--- llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.1 Mon Dec 2 15:21:36 2002
+++ llvm/include/llvm/CodeGen/MachineCodeEmitter.h Mon Dec 2 15:44:13 2002
@@ -10,11 +10,29 @@
#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
More information about the llvm-commits
mailing list