r215051 - Driver: Add -fno-profile-arcs to go with -fprofile-arcs
Chad Rosier
mcrosier at codeaurora.org
Wed Aug 6 20:52:54 PDT 2014
A test case might not be a bad idea..
> Author: bogner
> Date: Wed Aug 6 22:14:34 2014
> New Revision: 215051
>
> URL: http://llvm.org/viewvc/llvm-project?rev=215051&view=rev
> Log:
> Driver: Add -fno-profile-arcs to go with -fprofile-arcs
>
> This is a trivial gcc-compatible change.
>
> Modified:
> cfe/trunk/include/clang/Driver/Options.td
> cfe/trunk/lib/Driver/ToolChains.cpp
> cfe/trunk/lib/Driver/Tools.cpp
>
> Modified: cfe/trunk/include/clang/Driver/Options.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=215051&r1=215050&r2=215051&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/Options.td (original)
> +++ cfe/trunk/include/clang/Driver/Options.td Wed Aug 6 22:14:34 2014
> @@ -822,6 +822,7 @@ def fno_pic : Flag<["-"], "fno-pic">, Gr
> def fpie : Flag<["-"], "fpie">, Group<f_Group>;
> def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
> def fprofile_arcs : Flag<["-"], "fprofile-arcs">, Group<f_Group>;
> +def fno_profile_arcs : Flag<["-"], "fno-profile-arcs">, Group<f_Group>;
> def fprofile_generate : Flag<["-"], "fprofile-generate">, Group<f_Group>;
> def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;
> def frandom_seed_EQ : Joined<["-"], "frandom-seed=">,
> Group<clang_ignored_f_Group>;
>
> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=215051&r1=215050&r2=215051&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Aug 6 22:14:34 2014
> @@ -333,7 +333,8 @@ void DarwinClang::AddLinkRuntimeLibArgs(
> }
>
> // If we are building profile support, link that library in.
> - if (Args.hasArg(options::OPT_fprofile_arcs) ||
> + if (Args.hasFlag(options::OPT_fprofile_arcs,
> options::OPT_fno_profile_arcs,
> + false) ||
> Args.hasArg(options::OPT_fprofile_generate) ||
> Args.hasArg(options::OPT_fprofile_instr_generate) ||
> Args.hasArg(options::OPT_fcreate_profile) ||
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=215051&r1=215050&r2=215051&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Wed Aug 6 22:14:34 2014
> @@ -2105,7 +2105,8 @@ static void addClangRTLinux(
>
> static void addProfileRT(
> const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {
> - if (!(Args.hasArg(options::OPT_fprofile_arcs) ||
> + if (!(Args.hasFlag(options::OPT_fprofile_arcs,
> options::OPT_fno_profile_arcs,
> + false) ||
> Args.hasArg(options::OPT_fprofile_generate) ||
> Args.hasArg(options::OPT_fprofile_instr_generate) ||
> Args.hasArg(options::OPT_fcreate_profile) ||
> @@ -3226,7 +3227,8 @@ void Clang::ConstructJob(Compilation &C,
> if (Args.hasArg(options::OPT_ftest_coverage) ||
> Args.hasArg(options::OPT_coverage))
> CmdArgs.push_back("-femit-coverage-notes");
> - if (Args.hasArg(options::OPT_fprofile_arcs) ||
> + if (Args.hasFlag(options::OPT_fprofile_arcs,
> options::OPT_fno_profile_arcs,
> + false) ||
> Args.hasArg(options::OPT_coverage))
> CmdArgs.push_back("-femit-coverage-data");
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the cfe-commits
mailing list