[PATCH] D73951: [Clang] [Driver]Add logic to search for flang frontend

Richard Barton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 14 08:41:29 PST 2020


richard.barton.arm added a comment.

Still not sure why all the tests are needed here. The first one looks fine, i.e. we test that --fortran-fe=<path to copy of driver binary we just created> calls to that copy. The second one appears to test the default behaviour with no option, but why does it do it via a different name for clang, why would that make a difference? The second uses a different name for both driver and frontend. Why is that test relevant to the change you have made? As far as I can see, the name of the driver binary has no bearing on its behaviour wrt. calling a frontend binary. What am I missing?



================
Comment at: clang/include/clang/Driver/Options.td:268
+def fortran_fe : Separate<["-"], "fortran-fe">, InternalDriverOpt,
+  HelpText<"Name for native Fortran compiler">;
 
----------------
This is not right. I think the option points the driver at the name of the Fortran frontend to call. I don't think that has to be native or otherwise. Suggest changing this string to "Name for Fortran frontend"


================
Comment at: clang/test/Driver/flang/clang-driver-2-frontend01.f90:10
+! RUN: cp %clang %t1
+! RUN: %clang --driver-mode=flang -fortran-fe %basename_t.tmp1 -### %s 2>&1 | FileCheck --check-prefixes=ALL %s
+
----------------
Does %t1 not work again on this line?


================
Comment at: clang/test/Driver/flang/flang-driver-2-frontend01.f90:10
+
+! The invocations should begin with <test-file-name>.tmp1 -fc1.
+! ALL-LABEL: "{{[^"]*}}flang" "-fc1"
----------------
No they shouldn't ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73951





More information about the cfe-commits mailing list