2009-05-15 01:12:28 +00:00
|
|
|
//===-- DwarfException.h - Dwarf Exception Framework -----------*- C++ -*--===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains support for writing dwarf exception info into asm files.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXCEPTION_H
|
|
|
|
#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXCEPTION_H
|
2009-05-15 01:12:28 +00:00
|
|
|
|
2014-06-11 01:19:03 +00:00
|
|
|
#include "EHStreamer.h"
|
2011-05-10 18:39:09 +00:00
|
|
|
#include "llvm/CodeGen/AsmPrinter.h"
|
2009-05-15 01:12:28 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2010-04-05 05:28:23 +00:00
|
|
|
class MachineFunction;
|
2013-10-08 13:08:17 +00:00
|
|
|
class ARMTargetStreamer;
|
2011-01-14 21:57:45 +00:00
|
|
|
|
2014-06-11 01:19:03 +00:00
|
|
|
class DwarfCFIException : public EHStreamer {
|
2011-04-29 14:48:51 +00:00
|
|
|
/// shouldEmitPersonality - Per-function flag to indicate if .cfi_personality
|
|
|
|
/// should be emitted.
|
|
|
|
bool shouldEmitPersonality;
|
|
|
|
|
|
|
|
/// shouldEmitLSDA - Per-function flag to indicate if .cfi_lsda
|
|
|
|
/// should be emitted.
|
|
|
|
bool shouldEmitLSDA;
|
2011-01-14 21:57:53 +00:00
|
|
|
|
|
|
|
/// shouldEmitMoves - Per-function flag to indicate if frame moves info
|
|
|
|
/// should be emitted.
|
|
|
|
bool shouldEmitMoves;
|
|
|
|
|
2011-05-10 18:39:09 +00:00
|
|
|
AsmPrinter::CFIMoveType moveTypeModule;
|
|
|
|
|
2011-01-14 21:57:53 +00:00
|
|
|
public:
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
// Main entry points.
|
|
|
|
//
|
|
|
|
DwarfCFIException(AsmPrinter *A);
|
|
|
|
virtual ~DwarfCFIException();
|
|
|
|
|
2013-11-26 13:34:55 +00:00
|
|
|
/// endModule - Emit all exception information that should come after the
|
2011-01-14 21:57:53 +00:00
|
|
|
/// content.
|
2014-03-08 06:31:39 +00:00
|
|
|
void endModule() override;
|
2009-05-15 01:12:28 +00:00
|
|
|
|
2013-11-26 13:34:55 +00:00
|
|
|
/// beginFunction - Gather pre-function exception information. Assumes being
|
2009-05-15 01:12:28 +00:00
|
|
|
/// emitted immediately after the function entry point.
|
2014-03-08 06:31:39 +00:00
|
|
|
void beginFunction(const MachineFunction *MF) override;
|
2009-05-15 01:12:28 +00:00
|
|
|
|
2013-11-26 13:34:55 +00:00
|
|
|
/// endFunction - Gather and emit post-function exception information.
|
2014-03-08 06:31:39 +00:00
|
|
|
void endFunction(const MachineFunction *) override;
|
2009-05-15 01:12:28 +00:00
|
|
|
};
|
|
|
|
|
2014-06-11 01:19:03 +00:00
|
|
|
class ARMException : public EHStreamer {
|
|
|
|
void emitTypeInfos(unsigned TTypeEncoding) override;
|
2013-10-08 13:08:17 +00:00
|
|
|
ARMTargetStreamer &getTargetStreamer();
|
|
|
|
|
2014-02-14 17:19:07 +00:00
|
|
|
/// shouldEmitCFI - Per-function flag to indicate if frame CFI info
|
|
|
|
/// should be emitted.
|
|
|
|
bool shouldEmitCFI;
|
|
|
|
|
2011-03-05 18:43:15 +00:00
|
|
|
public:
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
// Main entry points.
|
|
|
|
//
|
|
|
|
ARMException(AsmPrinter *A);
|
|
|
|
virtual ~ARMException();
|
|
|
|
|
2013-11-26 13:34:55 +00:00
|
|
|
/// endModule - Emit all exception information that should come after the
|
2011-03-05 18:43:15 +00:00
|
|
|
/// content.
|
2014-03-08 06:31:39 +00:00
|
|
|
void endModule() override;
|
2011-03-05 18:43:15 +00:00
|
|
|
|
2013-11-26 13:34:55 +00:00
|
|
|
/// beginFunction - Gather pre-function exception information. Assumes being
|
2011-03-05 18:43:15 +00:00
|
|
|
/// emitted immediately after the function entry point.
|
2014-03-08 06:31:39 +00:00
|
|
|
void beginFunction(const MachineFunction *MF) override;
|
2011-03-05 18:43:15 +00:00
|
|
|
|
2013-11-26 13:34:55 +00:00
|
|
|
/// endFunction - Gather and emit post-function exception information.
|
2014-03-08 06:31:39 +00:00
|
|
|
void endFunction(const MachineFunction *) override;
|
2011-03-05 18:43:15 +00:00
|
|
|
};
|
2009-05-15 01:12:28 +00:00
|
|
|
} // End of namespace llvm
|
|
|
|
|
|
|
|
#endif
|