diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -1309,8 +1309,9 @@ support::endian::Writer DwoWriter(*DwoOS, support::little); W = &DwoWriter; return TotalSize + writeOneObject(Asm, Layout, DwoMode::DwoOnly); + } else { + return writeOneObject(Asm, Layout, DwoMode::AllSections); } - return writeOneObject(Asm, Layout, DwoMode::AllSections); } uint64_t WasmObjectWriter::writeOneObject(MCAssembler &Asm,