]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - lib/CodeGen/AsmPrinter/AsmPrinterHandler.h
Debug info: Implement (rvalue) reference qualifiers for C++11 non-static
[opencl/llvm.git] / lib / CodeGen / AsmPrinter / AsmPrinterHandler.h
1 //===-- lib/CodeGen/AsmPrinter/AsmPrinterHandler.h -------------*- 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 a generic interface for AsmPrinter handlers,
11 // like debug and EH info emitters.
12 //
13 //===----------------------------------------------------------------------===//
15 #ifndef CODEGEN_ASMPRINTER_ASMPRINTERHANDLER_H__
16 #define CODEGEN_ASMPRINTER_ASMPRINTERHANDLER_H__
18 #include "llvm/Support/DataTypes.h"
20 namespace llvm {
22 class MachineFunction;
23 class MachineInstr;
24 class MCSymbol;
26 /// \brief Collects and handles AsmPrinter objects required to build debug
27 /// or EH information.
28 class AsmPrinterHandler {
29 public:
30   virtual ~AsmPrinterHandler();
32   /// \brief For symbols that have a size designated (e.g. common symbols),
33   /// this tracks that size.
34   virtual void setSymbolSize(const MCSymbol *Sym, uint64_t Size) = 0;
36   /// \brief Emit all sections that should come after the content.
37   virtual void endModule() = 0;
39   /// \brief Gather pre-function debug information.
40   /// Every beginFunction(MF) call should be followed by an endFunction(MF)
41   /// call.
42   virtual void beginFunction(const MachineFunction *MF) = 0;
44   /// \brief Gather post-function debug information.
45   /// Please note that some AsmPrinter implementations may not call
46   /// beginFunction at all.
47   virtual void endFunction(const MachineFunction *MF) = 0;
49   /// \brief Process beginning of an instruction.
50   virtual void beginInstruction(const MachineInstr *MI) = 0;
52   /// \brief Process end of an instruction.
53   virtual void endInstruction() = 0;
54 };
55 } // End of namespace llvm
57 #endif