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 info into asm files. For
11 // Details on the Dwarf 3 specfication see DWARF Debugging Information Format
12 // V.3 reference manual http://dwarf.freestandards.org ,
14 // The role of the Dwarf Writer class is to extract debug information from the
15 // MachineDebugInfo 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
29 class MachineDebugInfo;
30 class MachineFunction;
34 //===----------------------------------------------------------------------===//
35 // DwarfWriter - Emits Dwarf debug and exception handling directives.
40 /// DM - Provides the DwarfWriter implementation.
46 DwarfWriter(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
47 virtual ~DwarfWriter();
49 /// SetDebugInfo - Set DebugInfo when it's known that pass manager has
50 /// created it. Set by the target AsmPrinter.
51 void SetDebugInfo(MachineDebugInfo *DI);
53 //===--------------------------------------------------------------------===//
57 /// BeginModule - Emit all Dwarf sections that should come prior to the
59 void BeginModule(Module *M);
61 /// EndModule - Emit all Dwarf sections that should come after the content.
65 /// BeginFunction - Gather pre-function debug information. Assumes being
66 /// emitted immediately after the function entry point.
67 void BeginFunction(MachineFunction *MF);
69 /// EndFunction - Gather and emit post-function debug information.
75 } // end llvm namespace