[PATCH] D97457: [flang][driver] Add `-fdebug-dump-parsing-log`

Chirag Khandelwal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 25 03:45:24 PST 2021


AMDChirag added inline comments.


================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:88-95
+// Tweak the frontend configuration based on the frontend action
+static void setUpFrontendBasedOnAction(FrontendOptions &opts) {
+  assert(opts.programAction_ != Fortran::frontend::InvalidAction &&
+      "Fortran frontend action not set!");
+
+  if (opts.programAction_ == DebugDumpParsingLog)
+    opts.instrumentedParse_ = true;
----------------
Will this function be extended in the future?
If not, an entirely separate function for a couple statements seems rather overkill.


================
Comment at: flang/lib/Frontend/FrontendActions.cpp:313-316
+  // Parse
+  ci.parsing().Parse(llvm::errs());
+  // Dump parsing log
+  ci.parsing().DumpParsingLog(llvm::outs());
----------------
NIT: what's the point of these comments?
They are pretty much exactly the same as the function names.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97457



More information about the cfe-commits mailing list