mirror of https://github.com/microsoft/clang.git
Driver: hoist `-mlimit-float-precision` (NFC)
Move the floating point argument handling into the RenderFloatingPointOptions helper. This relocation just puts the floating point related options into a single location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d361d13e84
commit
51fd40c31f
|
@ -2085,6 +2085,11 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
|
|||
StringRef DenormalFPMath = "";
|
||||
StringRef FPContract = "";
|
||||
|
||||
if (const Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) {
|
||||
CmdArgs.push_back("-mlimit-float-precision");
|
||||
CmdArgs.push_back(A->getValue());
|
||||
}
|
||||
|
||||
for (const Arg *A : Args) {
|
||||
switch (A->getOption().getID()) {
|
||||
// If this isn't an FP option skip the claim below
|
||||
|
@ -3662,11 +3667,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
getToolChain().addClangTargetOptions(Args, CmdArgs,
|
||||
JA.getOffloadingDeviceKind());
|
||||
|
||||
if (Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) {
|
||||
CmdArgs.push_back("-mlimit-float-precision");
|
||||
CmdArgs.push_back(A->getValue());
|
||||
}
|
||||
|
||||
// FIXME: Handle -mtune=.
|
||||
(void)Args.hasArg(options::OPT_mtune_EQ);
|
||||
|
||||
|
|
Loading…
Reference in New Issue