aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-02 21:44:13 +0000
committerChris Lattner <sabre@nondot.org>2002-12-02 21:44:13 +0000
commitd1c45a6633bb000920373c57b3590191d491036f (patch)
treed252d6e7c845b3d611ea011d76693bbf24877f5c /include
parent4aff92860d495907dbb04d1e8c088ed92eb4101d (diff)
downloadexternal_llvm-d1c45a6633bb000920373c57b3590191d491036f.zip
external_llvm-d1c45a6633bb000920373c57b3590191d491036f.tar.gz
external_llvm-d1c45a6633bb000920373c57b3590191d491036f.tar.bz2
Start adding to the meat of MachineCodeEmitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index 2e89083..69eea5c 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -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