DavidTruby requested changes to this revision. DavidTruby added a comment. This revision now requires changes to proceed.
If what I've suggested above doesn't work then the patch lgtm as is ================ Comment at: clang/lib/Driver/Driver.cpp:131 CCLogDiagnostics(false), CCGenDiagnostics(false), - TargetTriple(TargetTriple), CCCGenericGCCName(""), Saver(Alloc), - CheckInputsExist(true), GenReproducer(false), + TargetTriple(TargetTriple), CCCGenericGCCName(""), FFCGenericFortranName(""), + Saver(Alloc), CheckInputsExist(true), GenReproducer(false), ---------------- I think you can default this to "flang" here instead of "", and then you don't need to check if it is empty later (see my later comment) ================ Comment at: clang/lib/Driver/ToolChains/Flang.cpp:13-14 #include "clang/Driver/Options.h" - #include <cassert> ---------------- Nit: stray space here ================ Comment at: clang/lib/Driver/ToolChains/Flang.cpp:71-77 + const std::string &customFortranName = D.getFFCGenericFortranName(); + const char *FortranName; + if (!customFortranName.empty()) + FortranName = customFortranName.c_str(); + else FortranName = "flang"; + + const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath(FortranName)); ---------------- I think here you can just do `FortranName = D.getFFCGenericFortranName();` and then `getToolChain().GetProgramPath(FortranName.c_str())` as long as you have defaulted to "flang" earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73951/new/ https://reviews.llvm.org/D73951 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits