diff options
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 1b2eb24..1422014 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -768,7 +768,8 @@ void MCAssembler::writeSectionData(raw_ostream &OS, const MCSection *Sec, for (const MCFragment &F : *Sec) writeFragment(OS, *this, Layout, F); - assert(OS.tell() - Start == Layout.getSectionAddressSize(Sec)); + assert(getContext().hadError() || + OS.tell() - Start == Layout.getSectionAddressSize(Sec)); } std::tuple<MCValue, uint64_t, bool> |