[PATCH] D20413: CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 12:42:07 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL270258: CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor. (authored by pcc).

Changed prior to commit:
  http://reviews.llvm.org/D20413?vs=57735&id=57971#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20413

Files:
  llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Index: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -253,6 +253,7 @@
     }
     if (!EmitCodeView || MMI->getModule()->getDwarfVersion()) {
       DD = new DwarfDebug(this, &M);
+      DD->beginModule();
       Handlers.push_back(HandlerInfo(DD, DbgTimerName, DWARFGroupName));
     }
   }
Index: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -269,11 +269,6 @@
   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 @@
 // 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;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20413.57971.patch
Type: text/x-patch
Size: 1319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160520/a711bc15/attachment.bin>


More information about the llvm-commits mailing list