[PATCH] D125788: [flang][driver] Rename `flang-new` as `flang`

Valentin Clement via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 09:25:52 PDT 2022


clementval added inline comments.


================
Comment at: clang/lib/Driver/ToolChain.cpp:185
       {"flang", "--driver-mode=flang"},
+      {"flang-new", "--driver-mode=flang"},
       {"clang-dxc", "--driver-mode=dxc"},
----------------
Why do we need two lines here? Shouldn't we have a single line with the name chosen by the cmake option?


================
Comment at: clang/lib/Driver/ToolChains/Flang.cpp:132
   const auto& D = C.getDriver();
-  // TODO: Replace flang-new with flang once the new driver replaces the
-  // throwaway driver
-  const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC));
+  // Get the name of this executable. The `getClangProgramPath` hook  predates
+  // Flang, hence the name assumes that it's a Clang program. In practice, it
----------------



================
Comment at: flang/CMakeLists.txt:411
 
+option(FLANG_USE_LEGACY_NAME "Use the legacy name for the Flang driver." ON)
+
----------------
Maybe add a comment that says what is the legacy name.


================
Comment at: flang/test/lit.cfg.py:88
+        ToolSubst('%flang', command=FindTool(driver_name), unresolved='fatal'),
+    ToolSubst('%flang_fc1', command=FindTool(driver_name), extra_args=['-fc1'],
         unresolved='fatal')]
----------------
Is this the correct indentation?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125788



More information about the cfe-commits mailing list