================
@@ -6097,10 +6097,29 @@ const char *Driver::GetNamedOutputPath(Compilation &C, 
const JobAction &JA,
   }
 
   llvm::PrettyStackTraceString CrashInfo("Computing output path");
+
   // Output to a user requested destination?
   if (AtTopLevel && !isa<DsymutilJobAction>(JA) && !isa<VerifyJobAction>(JA)) {
-    if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o))
+    bool IsCLNonPCH =
+        IsCLMode() && !C.getArgs().hasArg(options::OPT__SLASH_Yc) &&
+        (isa<PreprocessJobAction>(JA) || isa<PrecompileJobAction>(JA));
+    bool HasAnyOutputArg = C.getArgs().hasArg(
+        options::OPT_o, options::OPT__SLASH_Fo, options::OPT__SLASH_Fo_COLON);
----------------
zmodem wrote:

`_SLASH_Fo_COLON` is an alias for `_SLASH_Fo`, so I'm not sure that you need to 
check for it explicitly? (Also applies for the uses below.)

https://github.com/llvm/llvm-project/pull/121046
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to