LLVM  3.7.0
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 
20 namespace llvm {
21 class MachineFunction;
22 class ARMTargetStreamer;
23 
25 protected:
27 
28  /// Per-function flag to indicate if frame CFI info should be emitted.
30 
31  void markFunctionEnd() override;
32 };
33 
35  /// Per-function flag to indicate if .cfi_personality should be emitted.
36  bool shouldEmitPersonality;
37 
38  /// Per-function flag to indicate if .cfi_lsda should be emitted.
39  bool shouldEmitLSDA;
40 
41  /// Per-function flag to indicate if frame moves info should be emitted.
42  bool shouldEmitMoves;
43 
44  AsmPrinter::CFIMoveType moveTypeModule;
45 
46 public:
47  //===--------------------------------------------------------------------===//
48  // Main entry points.
49  //
51  ~DwarfCFIException() override;
52 
53  /// Emit all exception information that should come after the content.
54  void endModule() override;
55 
56  /// Gather pre-function exception information. Assumes being emitted
57  /// immediately after the function entry point.
58  void beginFunction(const MachineFunction *MF) override;
59 
60  /// Gather and emit post-function exception information.
61  void endFunction(const MachineFunction *) override;
62 };
63 
65  void emitTypeInfos(unsigned TTypeEncoding) override;
66  ARMTargetStreamer &getTargetStreamer();
67 
68 public:
69  //===--------------------------------------------------------------------===//
70  // Main entry points.
71  //
73  ~ARMException() override;
74 
75  /// Emit all exception information that should come after the content.
76  void endModule() override;
77 
78  /// Gather pre-function exception information. Assumes being emitted
79  /// immediately after the function entry point.
80  void beginFunction(const MachineFunction *MF) override;
81 
82  /// Gather and emit post-function exception information.
83  void endFunction(const MachineFunction *) override;
84 };
85 } // End of namespace llvm
86 
87 #endif
bool shouldEmitCFI
Per-function flag to indicate if frame CFI info should be emitted.
Emits exception handling directives.
Definition: EHStreamer.h:33
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:66
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:110