LLVM API Documentation

DwarfException.h
Go to the documentation of this file.
00001 //===-- DwarfException.h - Dwarf Exception Framework -----------*- C++ -*--===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains support for writing dwarf exception info into asm files.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXCEPTION_H
00015 #define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXCEPTION_H
00016 
00017 #include "EHStreamer.h"
00018 #include "llvm/CodeGen/AsmPrinter.h"
00019 
00020 namespace llvm {
00021 class MachineFunction;
00022 class ARMTargetStreamer;
00023 
00024 class DwarfCFIException : public EHStreamer {
00025   /// shouldEmitPersonality - Per-function flag to indicate if .cfi_personality
00026   /// should be emitted.
00027   bool shouldEmitPersonality;
00028 
00029   /// shouldEmitLSDA - Per-function flag to indicate if .cfi_lsda
00030   /// should be emitted.
00031   bool shouldEmitLSDA;
00032 
00033   /// shouldEmitMoves - Per-function flag to indicate if frame moves info
00034   /// should be emitted.
00035   bool shouldEmitMoves;
00036 
00037   AsmPrinter::CFIMoveType moveTypeModule;
00038 
00039 public:
00040   //===--------------------------------------------------------------------===//
00041   // Main entry points.
00042   //
00043   DwarfCFIException(AsmPrinter *A);
00044   virtual ~DwarfCFIException();
00045 
00046   /// endModule - Emit all exception information that should come after the
00047   /// content.
00048   void endModule() override;
00049 
00050   /// beginFunction - Gather pre-function exception information.  Assumes being
00051   /// emitted immediately after the function entry point.
00052   void beginFunction(const MachineFunction *MF) override;
00053 
00054   /// endFunction - Gather and emit post-function exception information.
00055   void endFunction(const MachineFunction *) override;
00056 };
00057 
00058 class ARMException : public EHStreamer {
00059   void emitTypeInfos(unsigned TTypeEncoding) override;
00060   ARMTargetStreamer &getTargetStreamer();
00061 
00062   /// shouldEmitCFI - Per-function flag to indicate if frame CFI info
00063   /// should be emitted.
00064   bool shouldEmitCFI;
00065 
00066 public:
00067   //===--------------------------------------------------------------------===//
00068   // Main entry points.
00069   //
00070   ARMException(AsmPrinter *A);
00071   virtual ~ARMException();
00072 
00073   /// endModule - Emit all exception information that should come after the
00074   /// content.
00075   void endModule() override;
00076 
00077   /// beginFunction - Gather pre-function exception information.  Assumes being
00078   /// emitted immediately after the function entry point.
00079   void beginFunction(const MachineFunction *MF) override;
00080 
00081   /// endFunction - Gather and emit post-function exception information.
00082   void endFunction(const MachineFunction *) override;
00083 };
00084 } // End of namespace llvm
00085 
00086 #endif