Previously you just two hex numbers you had to decode manually.
This change adds a predicate formatter for extension flags
to produce failure messages like:
[ RUN ] AArch64CPUTests/AArch64CPUTestFixture.testAArch64CPU/2 <...>llvm/unittests/Support/TargetParserTest.cpp:862: Failure Expected extension flags: +fp-armv8, +crc, +crypto (0xe) Got extension flags: +fp-armv8, +neon, +crc, +crypto (0x1e) [ FAILED ] AArch64CPUTests/AArch64CPUTestFixture.testAArch64CPU/2, where GetParam() = "cortex-a34", "armv8-a", <...>
From there you can take the feature name and map it back
to the enum in ARM/AArch64TargetParser.def.
(which isn't perfect but you've probably got both files
open if you're editing these tests)
Note that AEK_NONE is not meant to be user facing in the compiler
but here it is part of the tests. So failures may show an
extension "none" where the normal target parser wouldn't.
The formatter is implemented as a template on ARM::ISAKind
because the predicate formatters assume all parameters are used
for comparison.
(e.g. PRED_FORMAT3 is for comparing 3 values, not having 3
arguments in general)
clang-format not found in user's PATH; not linting file.