AsmPrinter: Use DwarfStringPoolEntry in DwarfAccelTable, NFC
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfException.h
index 115869dc4ed8b728f2f569b6abbe023ef9c9beb6..a4fd36f0339a2ed3e2af9dbeee3d59f57e471c10 100644 (file)
@@ -21,7 +21,17 @@ namespace llvm {
 class MachineFunction;
 class ARMTargetStreamer;
 
-class DwarfCFIException : public EHStreamer {
+class DwarfCFIExceptionBase : public EHStreamer {
+protected:
+  DwarfCFIExceptionBase(AsmPrinter *A);
+
+  /// Per-function flag to indicate if frame CFI info should be emitted.
+  bool shouldEmitCFI;
+
+  void markFunctionEnd() override;
+};
+
+class DwarfCFIException : public DwarfCFIExceptionBase {
   /// Per-function flag to indicate if .cfi_personality should be emitted.
   bool shouldEmitPersonality;
 
@@ -38,7 +48,7 @@ public:
   // Main entry points.
   //
   DwarfCFIException(AsmPrinter *A);
-  virtual ~DwarfCFIException();
+  ~DwarfCFIException() override;
 
   /// Emit all exception information that should come after the content.
   void endModule() override;
@@ -51,19 +61,16 @@ public:
   void endFunction(const MachineFunction *) override;
 };
 
-class ARMException : public EHStreamer {
+class ARMException : public DwarfCFIExceptionBase {
   void emitTypeInfos(unsigned TTypeEncoding) override;
   ARMTargetStreamer &getTargetStreamer();
 
-  /// Per-function flag to indicate if frame CFI info should be emitted.
-  bool shouldEmitCFI;
-
 public:
   //===--------------------------------------------------------------------===//
   // Main entry points.
   //
   ARMException(AsmPrinter *A);
-  virtual ~ARMException();
+  ~ARMException() override;
 
   /// Emit all exception information that should come after the content.
   void endModule() override;