[PATCH] D88381: [Flang][Driver] Add PrintPreprocessed FrontendAction

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 10:16:55 PDT 2020


awarzynski updated this revision to Diff 299092.
awarzynski marked 3 inline comments as done.
awarzynski added a comment.

Address PR comments, make clearer separation between option types, simplify/fix tests

Based on the feedback, I've made a clearer separation between the parser and
the frontend driver options. I've also emphasised that mapping between the two
is a `TODO`. Initialisation to the defaults has been extracted out of
`ExecuteAction` (these should be set before an action is run).

I've also fixed a bug in the unit test and simplified the regression tests.
There's no need to differentiation between:

- `-E -`, `-E -o <output-file>` and `-E`

That is done in https://reviews.llvm.org/D87989. In this patch it is sufficient
to focus on testing `-E`.

Thank you for reviewing @sameeranjoshi !


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88381/new/

https://reviews.llvm.org/D88381

Files:
  clang/include/clang/Driver/Options.td
  flang/include/flang/Frontend/CompilerInstance.h
  flang/include/flang/Frontend/CompilerInvocation.h
  flang/include/flang/Frontend/FrontendActions.h
  flang/include/flang/Frontend/FrontendOptions.h
  flang/lib/Frontend/CompilerInstance.cpp
  flang/lib/Frontend/CompilerInvocation.cpp
  flang/lib/Frontend/FrontendAction.cpp
  flang/lib/Frontend/FrontendActions.cpp
  flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
  flang/test/Flang-Driver/driver-help-hidden.f90
  flang/test/Flang-Driver/driver-help.f90
  flang/test/Frontend/Inputs/hello-world.c
  flang/test/Frontend/print-preprocess-C-file.f90
  flang/test/Frontend/print-preprocessed-file.f90
  flang/unittests/Frontend/CMakeLists.txt
  flang/unittests/Frontend/PrintPreprocessedTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88381.299092.patch
Type: text/x-patch
Size: 18490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201019/e2586ff2/attachment-0001.bin>


More information about the cfe-commits mailing list