forked from OSchip/llvm-project
![]() All Fortran options should be set in `CompilerInstance` (via its `CompilerInvocation`) before any of `FrontendAction` is entered - that's one of the tasks of the driver. However, this is a bit tricky with fixed and free from detection introduced in https://reviews.llvm.org/D94228. Fixed-free form detection needs to happen: * before any frontend action (we need to specify `isFixedForm` in `Fortran::parser::Options` before running any actions) * separately for every input file (we might be compiling multiple Fortran files, some in free form, some in fixed form) In other words, we need this to happen early (before any `FrontendAction`), but not too early (we need to know what the current input file is). In practice, `isFixedForm` can only be set later than other options (other options are inferred from compiler flags). So we can't really set all of them in one place, which is not ideal. All changes in this patch are NFCs (hence no new tests). Quick summary: * move fixed/free form detection from `FrontendAction::ExecuteAction` to `CompilerInstance::ExecuteAction` * add a bool flag in `FrontendInputFile` to mark a file as fixed/free form * updated a few comments Differential Revision: https://reviews.llvm.org/D95042 |
||
---|---|---|
.. | ||
flang | ||
CMakeLists.txt |