diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 23:17:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 23:17:54 +0000 |
commit | d442aa368dcc43be6d81b19760f8ea130778d4f7 (patch) | |
tree | d8f24cb710ff0ac8168817190ef9e6df5d5e4171 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | e58b547460f540b71b362ac7f42a956cebb705a8 (diff) | |
download | bcm5719-llvm-d442aa368dcc43be6d81b19760f8ea130778d4f7.tar.gz bcm5719-llvm-d442aa368dcc43be6d81b19760f8ea130778d4f7.zip |
only emit section labels if we have debug info, fixing a few
regtest failures.
llvm-svn: 100366
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 977ab1210d5..428f14618b6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1794,9 +1794,10 @@ void DwarfDebug::beginModule(Module *M) { 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 @@ void DwarfDebug::beginModule(Module *M) { if (!ModuleCU) return; - + // Create DIEs for each subprogram. for (DebugInfoFinder::iterator I = DbgFinder.subprogram_begin(), E = DbgFinder.subprogram_end(); I != E; ++I) |