[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files
Diana Picus via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 29 01:25:07 PDT 2022
rovka added inline comments.
Herald added a subscriber: zero9178.
================
Comment at: flang/test/Driver/convert.f90:1
+! Ensure argument -fconvert=<value> works as expected.
+
----------------
jpenix-quic wrote:
> awarzynski wrote:
> > rovka wrote:
> > > Nit: Shouldn't you also check that valid values (e.g. unknown, swap etc) are accepted?
> > Could you be more specific? IIUC, this is more about making sure that the option parser works correctly and reports invalid usage of `-fconvert` as an error, right?
> > Nit: Shouldn't you also check that valid values (e.g. unknown, swap etc) are accepted?
>
> I might be doing something silly/missing something obvious, but I wasn't sure how to get FileCheck to basically just check that the command didn't error without adding checks, so I added trivial checks (VALID/VALID_FC1) for each of unknown/native/etc. Is there a better way of doing this? I also expanded flang/test/Lower/convert.f90 to check lowering for each of the valid options, so I didn't want to do full checks of the MLIR here.
Just in case it's not clear, this looks good to me now, it's exactly what I had in mind.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130513/new/
https://reviews.llvm.org/D130513
More information about the cfe-commits
mailing list