1 //===-- llvm/CodeGen/DwarfWriter.h - Dwarf Framework ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // 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;
36 //===----------------------------------------------------------------------===//
37 // DwarfWriter - Emits Dwarf debug and exception handling directives.
42 /// DD - Provides the DwarfWriter debug implementation.
46 /// DE - Provides the DwarfWriter exception implementation.
52 DwarfWriter(raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
53 virtual ~DwarfWriter();
55 /// SetModuleInfo - Set machine module info when it's known that pass manager
56 /// has created it. Set by the target AsmPrinter.
57 void SetModuleInfo(MachineModuleInfo *MMI);
59 //===--------------------------------------------------------------------===//
63 /// BeginModule - Emit all Dwarf sections that should come prior to the
65 void BeginModule(Module *M);
67 /// EndModule - Emit all Dwarf sections that should come after the content.
71 /// BeginFunction - Gather pre-function debug information. Assumes being
72 /// emitted immediately after the function entry point.
73 void BeginFunction(MachineFunction *MF);
75 /// EndFunction - Gather and emit post-function debug information.
77 void EndFunction(MachineFunction *MF);
81 } // end llvm namespace