From 49cd6649e1246c05896fadefe2fcbc4bc1f5d221 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 5 Apr 2010 05:11:15 +0000 Subject: change AsmPrinter to use DwarfDebug/DwarfException directly instead of going through DwarfWriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100405 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 196b73bdae..5cee67cf76 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -299,7 +299,7 @@ DbgScope::~DbgScope() { delete Variables[j]; } -DwarfDebug::DwarfDebug(AsmPrinter *A) +DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) : Asm(A), MMI(Asm->MMI), ModuleCU(0), AbbreviationsSet(InitAbbreviationsSetSize), CurrentFnDbgScope(0), DebugTimer(0) { @@ -310,6 +310,8 @@ DwarfDebug::DwarfDebug(AsmPrinter *A) if (TimePassesIsEnabled) DebugTimer = new Timer("Dwarf Debug Writer"); + + beginModule(M); } DwarfDebug::~DwarfDebug() { for (unsigned j = 0, M = DIEBlocks.size(); j < M; ++j) @@ -1791,9 +1793,6 @@ void DwarfDebug::constructSubprogramDIE(MDNode *N) { /// content. Create global DIEs and emit initial debug info sections. /// This is inovked by the target AsmPrinter. void DwarfDebug::beginModule(Module *M) { - if (!Asm->MAI->doesSupportDebugInformation()) - return; - MMI = Asm->MMI; TimeRegion Timer(DebugTimer); -- cgit v1.2.3-18-g5258