Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bc9b68d

Browse filesBrowse files
committed
Use IsCLMode to guard cl-style output argument presence
1 parent a9f9212 commit bc9b68d
Copy full SHA for bc9b68d

File tree

1 file changed

+8
-1
lines changed
Filter options

1 file changed

+8
-1
lines changed

‎clang/lib/Driver/Driver.cpp

Copy file name to clipboardExpand all lines: clang/lib/Driver/Driver.cpp
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5978,8 +5978,15 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA,
59785978
llvm::PrettyStackTraceString CrashInfo("Computing output path");
59795979
// Output to a user requested destination?
59805980
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) {
59825988
return C.addResultFile(FinalOutput->getValue(), &JA);
5989+
}
59835990
}
59845991

59855992
// For /P, preprocess to file named after BaseInput.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.