Although llvm-elfabi will attempt to read input files without needing the format to be manually specified, doing so has the potential to introduce extraneous errors that can hinder debugging (since multiple readers may fail in attempts to read the file). This change allows the input file format to be manually specified to force elfabi to use a single reader. This makes it easier to test and debug errors specific to a given reader.
Happy for this to be committed once my comments are addressed.
Nit: I think the style is to have a space between the # and CHECK.
Maybe worth checking the filename part of this in this error message.
Just run FileCheck --input-file=%t, rather than using cat.
Not sure if this available here, but something worth considering adding if it isn't. A lot of tests put a file on stdout using '-' as the filename. Doing so would then allow you to run FileCheck on it without needing to call cat or use --input-file:
I take it there's no way of making the input argument match-up case insensitive? I know that options can be case-insensitive if the command line library is used appropriately.
I looked into this for a while and couldn't find any way make these case insensitive. I assumed it would be possible too. I realized that the other command line options weren't case insensitive either, so I've set these to be lowercase only for consistency.