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
This commit is contained in:
Chris Lattner
2010-04-05 05:11:15 +00:00
parent 7fb053dd45
commit 49cd6649e1
5 changed files with 43 additions and 31 deletions

View File

@ -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);