Currently the new flang driver always runs in free form mode. Add support for fixed form mode based on the file extensions that f18 looks for, and treat "for", "FOR", "fpp" and "FPP" file extensions as fixed form files like gfortran does.
Additionally add support for the missing file extensions "ff", "FOR", "for", "f77", "ff90", "fpp", "FPP" to be compatible with f18 in this respect, along with extensions "f03", "F03", "f08", "F08" as the Cray Fortran compiler supports it.
The following file extensions will be processed as fixed form: .f, .F, .ff, .for, .FOR, .fpp, .FPP
Any other file type will be processed as free form.
Summary of changes:
- Add isFixedFormSuffix and isFreeFormSuffix to FrontendTool/Utils.h
- Set Fortran::parser::Options#isFixedForm according to the file type
- Change FrontendOptions#GetInputKindForExtension to support the missing file extensions that f18 supports and some additional file extensions
Do you really need this?