LLVM  6.0.0svn
DwarfException.h
Go to the documentation of this file.
1 //===-- DwarfException.h - Dwarf Exception Framework -----------*- C++ -*--===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains support for writing dwarf exception info into asm files.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXCEPTION_H
15 #define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXCEPTION_H
16 
17 #include "EHStreamer.h"
19 #include "llvm/MC/MCDwarf.h"
20 
21 namespace llvm {
22 class MachineFunction;
23 class ARMTargetStreamer;
24 
26 protected:
28 
29  /// Per-function flag to indicate if frame CFI info should be emitted.
31  /// Per-module flag to indicate if .cfi_section has beeen emitted.
33 
34  void markFunctionEnd() override;
35  void endFragment() override;
36 };
37 
39  /// Per-function flag to indicate if .cfi_personality should be emitted.
40  bool shouldEmitPersonality;
41 
42  /// Per-function flag to indicate if .cfi_personality must be emitted.
43  bool forceEmitPersonality;
44 
45  /// Per-function flag to indicate if .cfi_lsda should be emitted.
46  bool shouldEmitLSDA;
47 
48  /// Per-function flag to indicate if frame moves info should be emitted.
49  bool shouldEmitMoves;
50 
51 public:
52  //===--------------------------------------------------------------------===//
53  // Main entry points.
54  //
56  ~DwarfCFIException() override;
57 
58  /// Emit all exception information that should come after the content.
59  void endModule() override;
60 
61  /// Gather pre-function exception information. Assumes being emitted
62  /// immediately after the function entry point.
63  void beginFunction(const MachineFunction *MF) override;
64 
65  /// Gather and emit post-function exception information.
66  void endFunction(const MachineFunction *) override;
67 
68  void beginFragment(const MachineBasicBlock *MBB,
69  ExceptionSymbolProvider ESP) override;
70 };
71 
73  void emitTypeInfos(unsigned TTypeEncoding) override;
74  ARMTargetStreamer &getTargetStreamer();
75 
76 public:
77  //===--------------------------------------------------------------------===//
78  // Main entry points.
79  //
81  ~ARMException() override;
82 
83  /// Emit all exception information that should come after the content.
84  void endModule() override {}
85 
86  /// Gather pre-function exception information. Assumes being emitted
87  /// immediately after the function entry point.
88  void beginFunction(const MachineFunction *MF) override;
89 
90  /// Gather and emit post-function exception information.
91  void endFunction(const MachineFunction *) override;
92 };
93 } // End of namespace llvm
94 
95 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
bool shouldEmitCFI
Per-function flag to indicate if frame CFI info should be emitted.
Emits exception handling directives.
Definition: EHStreamer.h:31
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:77
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:105
bool hasEmittedCFISections
Per-module flag to indicate if .cfi_section has beeen emitted.
MCSymbol * ExceptionSymbolProvider(AsmPrinter *Asm)
void endModule() override
Emit all exception information that should come after the content.