https://github.com/tblah commented:

Thank you for contributing this.

The way we usually do this sort of thing would be to normalise arguments in the 
compiler driver ("flang": clang/lib/Driver...) and then only support the 
normalised arguments in the frontend driver ("flang -fc1": 
flang/lib/Frontend...).

So in this case I would replace -Mextend with -ffixed-line-length=132 in 
clang/lib/Driver/ToolChains/Flang.cpp and not support -Mextend at all as a 
flang -fc1 option. There are slightly more convenient APIs for manipulating 
arguments inside of clang/lib/Driver. The frontend driver is intended to be 
much more minimal.

Please also add tests to flang/test/Driver. If this is implemented in flag 
forwarding from the compiler driver to the frontend driver as I recommend 
above, a good way to test this would be something like

! RUN: flang -### -Mextend %s | FileCheck %s
! CHECK: flang -fc1
! CHECK-SAME: -ffixed-line-length=132

https://github.com/llvm/llvm-project/pull/173833
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to