1 //===-- llvm/CodeGen/DwarfWriter.h - Dwarf Framework ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by James M. Laskey and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains support for writing Dwarf debug and exception info into
11 // asm files. For Details on the Dwarf 3 specfication see DWARF Debugging
12 // Information Format V.3 reference manual http://dwarf.freestandards.org ,
14 // The role of the Dwarf Writer class is to extract information from the
15 // MachineModuleInfo object, organize it in Dwarf form and then emit it into asm
16 // the current asm file using data and high level Dwarf directives.
18 //===----------------------------------------------------------------------===//
20 #ifndef LLVM_CODEGEN_DWARFWRITER_H
21 #define LLVM_CODEGEN_DWARFWRITER_H
30 class MachineModuleInfo;
31 class MachineFunction;
35 //===----------------------------------------------------------------------===//
36 // DwarfWriter - Emits Dwarf debug and exception handling directives.
41 /// DD - Provides the DwarfWriter debug implementation.
45 /// DE - Provides the DwarfWriter exception implementation.
51 DwarfWriter(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
52 virtual ~DwarfWriter();
54 /// SetModuleInfo - Set machine module info when it's known that pass manager
55 /// has created it. Set by the target AsmPrinter.
56 void SetModuleInfo(MachineModuleInfo *MMI);
58 //===--------------------------------------------------------------------===//
62 /// BeginModule - Emit all Dwarf sections that should come prior to the
64 void BeginModule(Module *M);
66 /// EndModule - Emit all Dwarf sections that should come after the content.
70 /// BeginFunction - Gather pre-function debug information. Assumes being
71 /// emitted immediately after the function entry point.
72 void BeginFunction(MachineFunction *MF);
74 /// EndFunction - Gather and emit post-function debug information.
80 } // end llvm namespace