summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 685b46a606d..2da69fe1e4e 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -257,9 +257,12 @@ void MCDwarfLineTable::Emit(MCObjectStreamer *MCOS,
LineStr->emitSection(MCOS);
}
-void MCDwarfDwoLineTable::Emit(MCStreamer &MCOS,
- MCDwarfLineTableParams Params) const {
+void MCDwarfDwoLineTable::Emit(MCStreamer &MCOS, MCDwarfLineTableParams Params,
+ MCSection *Section) const {
+ if (Header.MCDwarfFiles.empty())
+ return;
Optional<MCDwarfLineStr> NoLineStr(None);
+ MCOS.SwitchSection(Section);
MCOS.EmitLabel(Header.Emit(&MCOS, Params, None, NoLineStr).second);
}
OpenPOWER on IntegriCloud