[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`
Kiran Chandramohan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 25 07:33:00 PDT 2021
kiranchandramohan added a comment.
minor comments.
================
Comment at: flang/lib/Frontend/FrontendAction.cpp:73
+ // Include standard macro predefinitions (use the file
+ // extension if the user didn't express any prefernce)
+ if ((invoc.preprocessorOpts().predefs_ == StdMacroPredefs::Include) ||
----------------
Nit: prefernce -> preference
below also.
================
Comment at: flang/lib/Frontend/FrontendOptions.cpp:23
// TODO: Add Cuda Fortan files (i.e. `*.cuf` and `*.CUF`).
return suffix == "f77" || suffix == "f90" || suffix == "F90" ||
suffix == "ff90" || suffix == "f95" || suffix == "F95" ||
----------------
Unrelated comment: f77 is probably not free form.
================
Comment at: flang/lib/Frontend/FrontendOptions.cpp:30
+bool Fortran::frontend::mustBePreprocessed(llvm::StringRef suffix) {
+ return suffix == "F" || suffix == "FOR" || suffix == "FPP" ||
+ suffix == "F90" || suffix == "F95" || suffix == "F03" ||
----------------
Consider adding fpp and making it match the behaviour of gfortran as given below.
"The preprocessor is automatically invoked if the file extension is .fpp, .FPP, .F, .FOR, .FTN, .F90, .F95, .F03 or .F08."
https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99292/new/
https://reviews.llvm.org/D99292
More information about the cfe-commits
mailing list