Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Driver/ToolChains/Clang.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 7,107 Lines • ▼ Show 20 Lines | if (IsOpenMPDevice) { | ||||
CmdArgs.push_back("-fopenmp-is-device"); | CmdArgs.push_back("-fopenmp-is-device"); | ||||
if (OpenMPDeviceInput) { | if (OpenMPDeviceInput) { | ||||
CmdArgs.push_back("-fopenmp-host-ir-file-path"); | CmdArgs.push_back("-fopenmp-host-ir-file-path"); | ||||
CmdArgs.push_back(Args.MakeArgString(OpenMPDeviceInput->getFilename())); | CmdArgs.push_back(Args.MakeArgString(OpenMPDeviceInput->getFilename())); | ||||
} | } | ||||
} | } | ||||
if (Triple.isAMDGPU()) { | if (Triple.isAMDGPU()) { | ||||
handleAMDGPUCodeObjectVersionOptions(D, Args, CmdArgs); | handleAMDGPUCodeObjectVersionOptions(D, Args, CmdArgs); | ||||
yaxunl: why do you need to change Args to C.getArgs() ? | |||||
You are right. Don't need it. Removed. saiislam: You are right. Don't need it. Removed. | |||||
Args.addOptInFlag(CmdArgs, options::OPT_munsafe_fp_atomics, | Args.addOptInFlag(CmdArgs, options::OPT_munsafe_fp_atomics, | ||||
options::OPT_mno_unsafe_fp_atomics); | options::OPT_mno_unsafe_fp_atomics); | ||||
} | } | ||||
// For all the host OpenMP offloading compile jobs we need to pass the targets | // For all the host OpenMP offloading compile jobs we need to pass the targets | ||||
// information using -fopenmp-targets= option. | // information using -fopenmp-targets= option. | ||||
if (JA.isHostOffloading(Action::OFK_OpenMP)) { | if (JA.isHostOffloading(Action::OFK_OpenMP)) { | ||||
▲ Show 20 Lines • Show All 957 Lines • ▼ Show 20 Lines | void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, | ||||
Arg *A; | Arg *A; | ||||
if (getDebugFissionKind(D, Args, A) == DwarfFissionKind::Split && | if (getDebugFissionKind(D, Args, A) == DwarfFissionKind::Split && | ||||
T.isOSBinFormatELF()) { | T.isOSBinFormatELF()) { | ||||
CmdArgs.push_back("-split-dwarf-output"); | CmdArgs.push_back("-split-dwarf-output"); | ||||
CmdArgs.push_back(SplitDebugName(JA, Args, Input, Output)); | CmdArgs.push_back(SplitDebugName(JA, Args, Input, Output)); | ||||
} | } | ||||
if (Triple.isAMDGPU()) | if (Triple.isAMDGPU()) | ||||
handleAMDGPUCodeObjectVersionOptions(D, Args, CmdArgs, /*IsCC1As=*/true); | handleAMDGPUCodeObjectVersionOptions(D, C.getArgs(), CmdArgs, | ||||
yaxunlUnsubmitted Not Done ReplyInline Actionsshould use Args instead of C.getArgs() yaxunl: should use Args instead of C.getArgs() | |||||
/*IsCC1As=*/true); | |||||
assert(Input.isFilename() && "Invalid input."); | assert(Input.isFilename() && "Invalid input."); | ||||
CmdArgs.push_back(Input.getFilename()); | CmdArgs.push_back(Input.getFilename()); | ||||
const char *Exec = getToolChain().getDriver().getClangProgramPath(); | const char *Exec = getToolChain().getDriver().getClangProgramPath(); | ||||
if (D.CC1Main && !D.CCGenDiagnostics) { | if (D.CC1Main && !D.CCGenDiagnostics) { | ||||
// Invoke cc1as directly in this process. | // Invoke cc1as directly in this process. | ||||
C.addCommand(std::make_unique<CC1Command>(JA, *this, | C.addCommand(std::make_unique<CC1Command>(JA, *this, | ||||
▲ Show 20 Lines • Show All 367 Lines • Show Last 20 Lines |
why do you need to change Args to C.getArgs() ?