ARM: consolidate MachO checks for ARM asm parser
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 5 Apr 2014 22:09:51 +0000 (22:09 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 5 Apr 2014 22:09:51 +0000 (22:09 +0000)
commitdd979e6457b3d2f8740cd583a34c029ddf105e5a
tree88e7f0e6f4e110ffabccc040eb8c41979c97ba24
parent857497b9c6362b63b29b7e18af9340befb17ef1b
ARM: consolidate MachO checks for ARM asm parser

This consolidates the duplicated MachO checks in the directive parsing for
various directives that are unsupported for Mach-O.  The error message change is
unimportant as this restores the behaviour to that prior to the addition of the
new directive handling.  Furthermore, use a more direct check for MachO
targeting rather than an indirect feature check of the assembler.

Also simplify the test execution command to avoid temporary files.  Further more,
perform the check in both object and assembly emission.

Whether all non-applicable directives are handled is another question.  .fnstart
is marked as being unsupported, however, the complementary .fnend is not.  The
additional unwinding directives are also still honoured.  This change does not
change that, though, it would be good to validate and mark them as being
unsupported if they are unsupported for the MachO emission.

llvm-svn: 205678
llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/test/MC/MachO/ARM/bad-darwin-directives.s