[llvm-commits] [llvm] r100366 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 4 16:17:54 PDT 2010
Author: lattner
Date: Sun Apr 4 18:17:54 2010
New Revision: 100366
URL: http://llvm.org/viewvc/llvm-project?rev=100366&view=rev
Log:
only emit section labels if we have debug info, fixing a few
regtest failures.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=100366&r1=100365&r2=100366&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sun Apr 4 18:17:54 2010
@@ -1794,9 +1794,10 @@
DebugInfoFinder DbgFinder;
DbgFinder.processModule(*M);
- // Emit initial sections
- EmitSectionLabels();
-
+ // Emit initial sections.
+ if (DbgFinder.compile_unit_begin() != DbgFinder.compile_unit_end())
+ EmitSectionLabels();
+
// Create all the compile unit DIEs.
for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(),
E = DbgFinder.compile_unit_end(); I != E; ++I)
@@ -1804,7 +1805,7 @@
if (!ModuleCU)
return;
-
+
// Create DIEs for each subprogram.
for (DebugInfoFinder::iterator I = DbgFinder.subprogram_begin(),
E = DbgFinder.subprogram_end(); I != E; ++I)
More information about the llvm-commits
mailing list