Add virtual dtor, expose a debug impl
authorChris Lattner <sabre@nondot.org>
Tue, 3 Dec 2002 20:56:20 +0000 (20:56 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 3 Dec 2002 20:56:20 +0000 (20:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4892 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineCodeEmitter.h

index cddadb2661e69b0d49368eb1d8eff150cb024521..f0e5e3f2cb275b56dc205681a48294ac99f46609 100644 (file)
@@ -15,6 +15,7 @@ class MachineBasicBlock;
 class Value;
 
 struct MachineCodeEmitter {
+  virtual ~MachineCodeEmitter() {}
 
   /// startFunction - This callback is invoked when the specified function is
   /// about to be code generated.
@@ -41,6 +42,13 @@ struct MachineCodeEmitter {
   /// and jump instructions typically.
   ///
   virtual void emitPCRelativeDisp(Value *V) {}
+
+
+  /// createDebugMachineCodeEmitter - Return a dynamically allocated machine
+  /// code emitter, which just prints the opcodes and fields out the cout.  This
+  /// can be used for debugging users of the MachineCodeEmitter interface.
+  ///
+  static MachineCodeEmitter *createDebugMachineCodeEmitter();
 };
 
 #endif