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.