DebugInfo: Don't include the name of the CU file in the line table file list when...
[oota-llvm.git] / lib / MC / MCObjectStreamer.cpp
index f00231e3d316276ca4ac9ba87de4403aeca21e9c..bfa3c8cfa34d1ec53ab6e642f042b3d400f7f7e6 100644 (file)
@@ -379,7 +379,8 @@ void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
 void MCObjectStreamer::FinishImpl() {
   // Dump out the dwarf file & directory tables and line tables.
   const MCSymbol *LineSectionSymbol = NULL;
-  if (getContext().hasDwarfFiles())
+  if (!getContext().getMCLineTableSymbols().empty() ||
+      getContext().hasDwarfFiles())
     LineSectionSymbol = MCDwarfFileTable::Emit(this);
 
   // If we are generating dwarf for assembly source files dump out the sections.