r342512 - Driver: hoist `-mlimit-float-precision` (NFC)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 18 14:12:40 PDT 2018
Author: compnerd
Date: Tue Sep 18 14:12:39 2018
New Revision: 342512
URL: http://llvm.org/viewvc/llvm-project?rev=342512&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=342512&r1=342511&r2=342512&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Tue Sep 18 14:12:39 2018
@@ -2085,6 +2085,11 @@ static void RenderFloatingPointOptions(c
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,
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);
More information about the cfe-commits
mailing list