summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp1
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
2 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index e9335054275..4b910b08f5d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -253,6 +253,7 @@ bool AsmPrinter::doInitialization(Module &M) {
}
if (!EmitCodeView || MMI->getModule()->getDwarfVersion()) {
DD = new DwarfDebug(this, &M);
+ DD->beginModule();
Handlers.push_back(HandlerInfo(DD, DbgTimerName, DWARFGroupName));
}
}
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;
OpenPOWER on IntegriCloud