This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Improve diagnostics message when Neon is unsupported
ClosedPublic

Authored by vhscampos on Jun 15 2020, 9:04 AM.

Details

Summary

Whenever Neon is not supported, a generic message is printed:

error: "NEON support not enabled"

Followed by a series of other error messages that are not useful once
the first one is printed.

This patch gives a more precise message in the case where Neon is
unsupported because an invalid float ABI was specified: the soft float
ABI.

error: "NEON intrinsics not available with the soft-float ABI. Please
use -mfloat-abi=softfp or -mfloat-abi=hard"

This message is the same one that GCC gives, so it is also making their
diagnostics more compatible with each other.

Also, by rearranging preprocessor directives, these "unsupported" error
messages are now the only ones printed out, which is also GCC's
behaviour.

Diff Detail

Event Timeline

vhscampos created this revision.Jun 15 2020, 9:04 AM
LukeGeeson accepted this revision.Jun 16 2020, 8:09 AM
LukeGeeson added a subscriber: LukeGeeson.

Very simple change, looks good to me.

Please wait a week or so before submitting, so that non-arm folks have time to raise issues

This revision is now accepted and ready to land.Jun 16 2020, 8:09 AM
This revision was automatically updated to reflect the committed changes.