Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Driver/Driver.cpp
Show First 20 Lines • Show All 4,893 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, | const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, | ||||
const char *BaseInput, | const char *BaseInput, | ||||
StringRef OrigBoundArch, bool AtTopLevel, | StringRef OrigBoundArch, bool AtTopLevel, | ||||
bool MultipleArchs, | bool MultipleArchs, | ||||
StringRef OffloadingPrefix) const { | StringRef OffloadingPrefix) const { | ||||
std::string BoundArch = OrigBoundArch.str(); | std::string BoundArch = OrigBoundArch.str(); | ||||
#if defined(_WIN32) | if (is_style_windows(llvm::sys::path::Style::native)) { | ||||
// BoundArch may contains ':', which is invalid in file names on Windows, | // BoundArch may contains ':', which is invalid in file names on Windows, | ||||
// therefore replace it with '%'. | // therefore replace it with '%'. | ||||
std::replace(BoundArch.begin(), BoundArch.end(), ':', '@'); | std::replace(BoundArch.begin(), BoundArch.end(), ':', '@'); | ||||
#endif | } | ||||
llvm::PrettyStackTraceString CrashInfo("Computing output path"); | llvm::PrettyStackTraceString CrashInfo("Computing output path"); | ||||
// Output to a user requested destination? | // Output to a user requested destination? | ||||
if (AtTopLevel && !isa<DsymutilJobAction>(JA) && !isa<VerifyJobAction>(JA)) { | if (AtTopLevel && !isa<DsymutilJobAction>(JA) && !isa<VerifyJobAction>(JA)) { | ||||
if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) | if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) | ||||
return C.addResultFile(FinalOutput->getValue(), &JA); | return C.addResultFile(FinalOutput->getValue(), &JA); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 698 Lines • Show Last 20 Lines |