[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. As there have been no new comments and this patch has already been accepted, I decided to merge it without waiting for more reviews. Please leave post-commit comments if I missed anything and I will address them. Thank you all for reviewing! Repository: rG LLVM G

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-04-07 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb83a4450c216: [flang][driver] Add support for `-cpp/-nocpp` (authored by awarzynski). Changed prior to commit: https://reviews.llvm.org/D99292?vs=

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-04-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/include/flang/Frontend/CompilerInvocation.h:142 + /// + /// \param [in] ppOpts The preprocessor options + void collectMacroDefinitions(); kiranchandramohan wrote: > Nit: Misplaced? Don't see any params here.

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-04-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 334667. awarzynski marked 3 inline comments as done. awarzynski added a comment. Update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99292/new/ https://reviews.llvm.org/D99292 Files: clang/inclu

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-30 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan accepted this revision. kiranchandramohan added a comment. This revision is now accepted and ready to land. LGTM. Comment at: flang/include/flang/Frontend/CompilerInvocation.h:142 + /// + /// \param [in] ppOpts The preprocessor options + void collectMacroDe

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/include/clang/Driver/Options.td:4302 +def cpp : Flag<["-"], "cpp">, Group, + HelpText<"Always add standard macro predefinitions">; +def nocpp : Flag<["-"], "nocpp">, Group, tskeith wrote: > This option affects

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 333953. awarzynski added a comment. Make sure that `-cpp\-nocpp` controls command line macro definitions too As @tskeith pointed out, `-cpp\-nocpp` should also affect command line macro definitions (on top of standard macro predefinitions). With this chang

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: clang/include/clang/Driver/Options.td:4302 +def cpp : Flag<["-"], "cpp">, Group, + HelpText<"Always add standard macro predefinitions">; +def nocpp : Flag<["-"], "nocpp">, Group, This option affects command line macro d

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 333807. awarzynski added a comment. Address PR comments + updated comments + rebase I refined some comments and added `-fpp` to the list of file extensions. Thank you @kiranchandramohan for pointing this out! Repository: rG LLVM Github Monorepo CHANG

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-25 Thread Kiran Chandramohan via Phabricator via cfe-commits
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_ == StdMacroPred

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/include/flang/Frontend/CompilerInvocation.h:135-138 + + /// Updates this instance based on the extension of the input file (e.g. f90 + /// s F90) + void updateBasedOnExtension(const FrontendInputFile &inputFile);

[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added subscribers: jansvoboda11, dang. awarzynski requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for the `-cpp` and `-nocpp` flags. The im