diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-04-27 15:34:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-04-27 15:34:57 +0000 |
commit | 34d7a99062222ce2eb60d66338f625009e4335fe (patch) | |
tree | 72f13b35ce36a511a5e2a8075655e2e575a9de7e | |
parent | 75afda6c330d4f6aed9f5cccdbaff8b44863bda1 (diff) | |
download | bcm5719-llvm-34d7a99062222ce2eb60d66338f625009e4335fe.tar.gz bcm5719-llvm-34d7a99062222ce2eb60d66338f625009e4335fe.zip |
Add Driver support for -fno-constant-cfstrings.
llvm-svn: 102431
-rw-r--r-- | clang/include/clang/Driver/Options.td | 2 | ||||
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 1487121208b..844d317846f 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -248,7 +248,7 @@ def fclasspath_EQ : Joined<"-fclasspath=">, Group<f_Group>; def fcolor_diagnostics : Flag<"-fcolor-diagnostics">, Group<f_Group>; def fcommon : Flag<"-fcommon">, Group<f_Group>; def fcompile_resource_EQ : Joined<"-fcompile-resource=">, Group<f_Group>; -def fconstant_cfstrings : Flag<"-fconstant-cfstrings">, Group<clang_ignored_f_Group>; +def fconstant_cfstrings : Flag<"-fconstant-cfstrings">, Group<f_Group>; def fconstant_string_class_EQ : Joined<"-fconstant-string-class=">, Group<f_Group>; def fcreate_profile : Flag<"-fcreate-profile">, Group<f_Group>; def fdebug_pass_arguments : Flag<"-fdebug-pass-arguments">, Group<f_Group>; diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 8ad04aa508e..db5f92d8ec6 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1248,6 +1248,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, options::OPT_fno_assume_sane_operator_new)) CmdArgs.push_back("-fno-assume-sane-operator-new"); + // -fconstant-cfstrings is default, and may be subject to argument translation + // on Darwin. + if (!Args.hasFlag(options::OPT_fconstant_cfstrings, + options::OPT_fno_constant_cfstrings) || + !Args.hasFlag(options::OPT_mconstant_cfstrings, + options::OPT_mno_constant_cfstrings)) + CmdArgs.push_back("-fno-constant-cfstrings"); + // -fshort-wchar default varies depending on platform; only // pass if specified. if (Arg *A = Args.getLastArg(options::OPT_fshort_wchar)) { |