MCParser: diagnose missing directional labels more clearly.
authorTim Northover <tnorthover@apple.com>
Mon, 11 Apr 2016 19:50:46 +0000 (19:50 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 11 Apr 2016 19:50:46 +0000 (19:50 +0000)
commit6b3169bb97a121ea9fcddafea20222b94cc59c51
tree8dea76fe3bc1cfcf53bd2d3888b78a118f8c91e2
parent53207a99f9d6a93c12bf0114556a7f0dd7e87d1f
MCParser: diagnose missing directional labels more clearly.

Before, ELF at least managed a diagnostic but it was a completely untraceable
"undefined symbol" error. MachO had a variety of even worse behaviours: crash,
emit corrupt file, or an equally bad message.

llvm-svn: 265984
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/test/MC/AArch64/error-location.s
llvm/test/MC/ARM/error-location.s
llvm/test/MC/ELF/undefined-directional.s [new file with mode: 0644]
llvm/test/MC/MachO/undefined-directional.s [new file with mode: 0644]