From eb3fc289141ad44883acbb91e839ab1b9a0f2025 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 8 Jan 2009 23:40:34 +0000 Subject: Convert DwarfWriter into a pass. Now Users request DwarfWriter through getAnalysisUsage() instead of creating an instance of DwarfWriter object directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61955 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/DwarfWriter.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index 8614eec..7ed5e61 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -20,6 +20,8 @@ #ifndef LLVM_CODEGEN_DWARFWRITER_H #define LLVM_CODEGEN_DWARFWRITER_H +#include "llvm/Pass.h" + namespace llvm { class AsmPrinter; @@ -35,7 +37,7 @@ class raw_ostream; // DwarfWriter - Emits Dwarf debug and exception handling directives. // -class DwarfWriter { +class DwarfWriter : public ImmutablePass { private: /// DD - Provides the DwarfWriter debug implementation. /// @@ -46,20 +48,19 @@ private: DwarfException *DE; public: - DwarfWriter(raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T); + static char ID; // Pass identification, replacement for typeid + + DwarfWriter(); virtual ~DwarfWriter(); - /// SetModuleInfo - Set machine module info when it's known that pass manager - /// has created it. Set by the target AsmPrinter. - void SetModuleInfo(MachineModuleInfo *MMI); - //===--------------------------------------------------------------------===// // Main entry points. // /// BeginModule - Emit all Dwarf sections that should come prior to the /// content. - void BeginModule(Module *M); + void BeginModule(Module *M, MachineModuleInfo *MMI, raw_ostream &OS, + AsmPrinter *A, const TargetAsmInfo *T); /// EndModule - Emit all Dwarf sections that should come after the content. /// -- cgit v1.1