[PATCH] D14717: [Assembler] Make fatal assembler errors non-fatal

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 11:04:19 PST 2015


olista01 created this revision.
olista01 added a reviewer: rengolin.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added a subscriber: dsanders.

Currently, if the assembler encounters an error after parsing (such as an out-of-range fixup), it reports this as a fatal error, and so stops after the first error. However, for most of these there is an obvious way to recover after emitting the error, such as emitting the fixup with a value of zero. This means that we can report on all of the errors in a file, not just the first one. MCContext::reportError records the fact that an error was encountered, so we won't actually emit an object file with the incorrect contents.

Repository:
  rL LLVM

http://reviews.llvm.org/D14717

Files:
  include/llvm/MC/MCWinCOFFStreamer.h
  lib/MC/ELFObjectWriter.cpp
  lib/MC/MCAssembler.cpp
  lib/MC/WinCOFFObjectWriter.cpp
  lib/MC/WinCOFFStreamer.cpp
  lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
  lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
  lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp
  lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
  test/MC/AArch64/error-location.s
  test/MC/ARM/arm-elf-relocation-diagnostics.s
  test/MC/ARM/error-location.s
  test/MC/ARM/thumb1-relax-adr-local.s
  test/MC/ARM/thumb1-relax-bcc-local.s
  test/MC/ARM/thumb1-relax-br-local.s
  test/MC/ARM/thumb1-relax-ldrlit-local-behind.s
  test/MC/ARM/thumb1-relax-ldrlit-local-misaligned.s
  test/MC/ARM/thumb1-relax-ldrlit-local-range.s
  test/MC/ARM/thumb1-relax.s
  test/MC/COFF/bad-expr.s
  test/MC/COFF/invalid-def.s
  test/MC/COFF/invalid-endef.s
  test/MC/COFF/invalid-scl-range.s
  test/MC/COFF/invalid-scl.s
  test/MC/COFF/invalid-type.s
  test/MC/COFF/label-undefined.s
  test/MC/COFF/secidx-diagnostic.s
  test/MC/ELF/common-error1.s
  test/MC/ELF/common-error2.s
  test/MC/MachO/AArch64/reloc-errors.s
  test/MC/MachO/ARM/bad-darwin-ARM-reloc.s
  test/MC/MachO/bad-darwin-x86_64-diff-relocs.s
  test/MC/MachO/bad-darwin-x86_64-reloc-expr1.s
  test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s
  test/MC/Mips/micromips-diagnostic-fixup.s
  test/MC/Mips/micromips-pc16-fixup.s
  test/MC/Mips/mips-diagnostic-fixup.s
  test/MC/Mips/mips-pc16-fixup.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14717.40314.patch
Type: text/x-patch
Size: 47853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151116/55374133/attachment.bin>


More information about the llvm-commits mailing list