diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-05 05:11:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-05 05:11:15 +0000 |
commit | 49cd6649e1246c05896fadefe2fcbc4bc1f5d221 (patch) | |
tree | 77851ece439e59655641bd002393078e8a9d006a /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 7fb053dd45f7754b0a359a9de1a7445aefcca318 (diff) |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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); |