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
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=
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.
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
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
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
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
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
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
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
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);
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
12 matches
Mail list logo