Add and update reset() and doInitialization() methods to MC* and passes.
[oota-llvm.git] / include / llvm / MC / MCWinEH.h
index 8510ae105948c3b371c48aff1afe9ac421661fbf..05b58c753b661d32929a2638be9c2e3bfc4a55f2 100644 (file)
 #include <vector>
 
 namespace llvm {
+class MCContext;
+class MCSection;
+class MCStreamer;
 class MCSymbol;
+class StringRef;
 
 namespace WinEH {
 struct Instruction {
@@ -58,6 +62,22 @@ struct FrameInfo {
       HandlesUnwind(false), HandlesExceptions(false), LastFrameInst(-1),
       ChainedParent(ChainedParent), Instructions() {}
 };
+
+class UnwindEmitter {
+public:
+  static const MCSection *getPDataSection(const MCSymbol *Function,
+                                          MCContext &Context);
+  static const MCSection *getXDataSection(const MCSymbol *Function,
+                                          MCContext &Context);
+
+  virtual ~UnwindEmitter() { }
+
+  //
+  // This emits the unwind info sections (.pdata and .xdata in PE/COFF).
+  //
+  virtual void Emit(MCStreamer &Streamer) const = 0;
+  virtual void EmitUnwindInfo(MCStreamer &Streamer, FrameInfo *FI) const = 0;
+};
 }
 }