diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-05-20 19:35:35 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-05-20 19:35:35 +0000 |
commit | 5973bc8a82dc585b1f08190e4baba389a17a880f (patch) | |
tree | fb8a180f9b9d569b1e49c054ba792069d54bd37c /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 96c9ae6a20269a6dec5601f09c8ecf173a6f54ad (diff) | |
download | bcm5719-llvm-5973bc8a82dc585b1f08190e4baba389a17a880f.tar.gz bcm5719-llvm-5973bc8a82dc585b1f08190e4baba389a17a880f.zip |
CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.
This gives AsmPrinter a chance to initialize its DD field before
we call beginModule(), which is about to start using it.
Differential Revision: http://reviews.llvm.org/D20413
llvm-svn: 270258
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 52f5a02791e..0b279fb6f97 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -269,11 +269,6 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) UseDWARF2Bitfields = (DwarfVersion < 4) || tuneForGDB(); Asm->OutStreamer->getContext().setDwarfVersion(DwarfVersion); - - { - NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled); - beginModule(); - } } // Define out of line so we don't have to include DwarfUnit.h in DwarfDebug.h. @@ -465,6 +460,7 @@ void DwarfDebug::constructAndAddImportedEntityDIE(DwarfCompileUnit &TheCU, // global DIEs and emit initial debug info sections. This is invoked by // the target AsmPrinter. void DwarfDebug::beginModule() { + NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled); if (DisableDebugInfoPrinting) return; |