================
@@ -1320,7 +1320,18 @@ void Flang::ConstructJob(Compilation &C, const JobAction 
&JA,
       Input.getInputArg().renderAsInput(Args, CmdArgs);
   }
 
-  const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
+  // Handle "clang --driver-mode=flang" case
+  bool isClangDriverWithFlangMode = false;
+  if (D.Name.find("clang") != std::string_view::npos) {
+    if (const Arg *A = Args.getLastArg(options::OPT_driver_mode)) {
+      if (std::string_view(A->getValue()) == "flang") {
+        isClangDriverWithFlangMode = true;
+      }
+    }
+  }
----------------
tarunprabhu wrote:

I don't think we need the braces here. Unlike flang, clang's style guide does 
not require them.

https://github.com/llvm/llvm-project/pull/200438
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to