File tree 1 file changed +8
-1
lines changed
Filter options
1 file changed +8
-1
lines changed
Original file line number Diff line number Diff line change @@ -5978,8 +5978,15 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA,
5978
5978
llvm::PrettyStackTraceString CrashInfo (" Computing output path" );
5979
5979
// Output to a user requested destination?
5980
5980
if (AtTopLevel && !isa<DsymutilJobAction>(JA) && !isa<VerifyJobAction>(JA)) {
5981
- if (Arg *FinalOutput = C.getArgs ().getLastArg (options::OPT_o, options::OPT__SLASH_Fo, options::OPT__SLASH_Fo_COLON))
5981
+ Arg *FinalOutput =
5982
+ IsCLMode ()
5983
+ ? C.getArgs ().getLastArg (options::OPT_o, options::OPT__SLASH_Fo,
5984
+ options::OPT__SLASH_Fo_COLON)
5985
+ : C.getArgs ().getLastArg (options::OPT_o);
5986
+
5987
+ if (FinalOutput != nullptr ) {
5982
5988
return C.addResultFile (FinalOutput->getValue (), &JA);
5989
+ }
5983
5990
}
5984
5991
5985
5992
// For /P, preprocess to file named after BaseInput.
You can’t perform that action at this time.
0 commit comments