[PATCH] D96716: [flang][driver] Add debug dump options

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 16 06:35:21 PST 2021


awarzynski added a comment.

I think that this patch does a great job demonstrating the use of frontend actions and how _action_ compiler flags map to them. Given how `Fortran::semantics::Semantics` are defined and created, I think that adding _semantics_ as a member variable to `PrescanAndSemaAction` makes a lot of sense.

Btw, I also think that it would be worth exploring what Clang does. Ideally we'd have some `Sema` API that would be a member of `CompilerInstance`. However, that's outside the scope of this patch :)

Apart from one comment this looks good to me. Thank you for submitting this @FarisRehman !



================
Comment at: flang/include/flang/Frontend/FrontendActions.h:54
+public:
+  std::unique_ptr<Fortran::semantics::Semantics> semantics_;
 };
----------------
Do we need to expose it? Shouldn't this be private?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96716



More information about the cfe-commits mailing list