From dcc0eddd182cdbb1c97ec78d346feb95f6fc4bd4 Mon Sep 17 00:00:00 2001 From: Larisse Voufo Date: Sat, 21 Feb 2015 01:03:48 +0000 Subject: [PATCH] Move -fdefine-sized-deallocation and -fno-sized-deallocation options from driver into CC1 for now. llvm-svn: 230112 --- clang/include/clang/Driver/CC1Options.td | 4 ++++ clang/include/clang/Driver/Options.td | 4 ---- clang/lib/Driver/Tools.cpp | 9 --------- clang/www/cxx_status.html | 13 +++++++------ 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index e69add8..f1c30c4 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -518,6 +518,10 @@ def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">, HelpText<"Undefines the __DEPRECATED macro">; def fsized_deallocation : Flag<["-"], "fsized-deallocation">, HelpText<"Enable C++14 sized global deallocation functions">; +def fno_sized_deallocation: Flag<["-"], "fno-sized-deallocation">, + HelpText<"Disable sized deallocation functions">; +def fdefine_sized_deallocation: Flag<["-"], "fdefine-sized-deallocation">, + HelpText<"Allow compiler-generated definition of sized deallocation functions">; def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">, HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">; def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">, diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index b703109..dae80f9 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -394,10 +394,6 @@ def fasm_blocks : Flag<["-"], "fasm-blocks">, Group, Flags<[CC1Option]> def fno_asm_blocks : Flag<["-"], "fno-asm-blocks">, Group; def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group; -def fno_sized_deallocation: Flag<["-"], "fno-sized-deallocation">, Group, - HelpText<"Disable sized deallocation functions">, Flags<[CC1Option]>; -def fdefine_sized_deallocation: Flag<["-"], "fdefine-sized-deallocation">, Group, - HelpText<"Allow compiler-generated definition of sized deallocation functions">, Flags<[CC1Option]>; def fastcp : Flag<["-"], "fastcp">, Group; def fastf : Flag<["-"], "fastf">, Group; def fast : Flag<["-"], "fast">, Group; diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index a8cfe82..28279bb 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4222,15 +4222,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasFlag(options::OPT_fassume_sane_operator_new, options::OPT_fno_assume_sane_operator_new)) CmdArgs.push_back("-fno-assume-sane-operator-new"); - - // -fno-sized-deallocation: disable sized delete. - if (Args.hasArg(options::OPT_fno_sized_deallocation)) - CmdArgs.push_back("-fno-sized-deallocation"); - - // -fdefine-sized-deallocation: default implementation of sized delete as a - // weak definition. - if (Args.hasArg(options::OPT_fdefine_sized_deallocation)) - CmdArgs.push_back("-fdefine-sized-deallocation"); // -fconstant-cfstrings is default, and may be subject to argument translation // on Darwin. diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 990bd7b..e713da6 100644 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -505,12 +505,13 @@ Clang version in which each feature became available.

-(6): As of Clang 3.7, using sized deallocation in C++14 mode requires linking either -libc++ 3.7 or later, or libstdc++ 5 or later. Alternatively, you can use the --fdefine-sized-deallocation compiler option to enable the implementation under -Clang 3.4 through Clang 3.6, where weak definitions of sized deallocation functions are implicitly -generated (by the compiler). You can also use the -fno-sized-deallocation option -to disable sized deallocation. +(6): In Clang SVN, using sized deallocation in C++14 mode requires linking either +libc++ 3.7 or later, or libstdc++ 5 or later. Alternatively, you can use the +-Xclang -fdefine-sized-deallocation compiler option to enable the implementation from +Clang 3.4 through Clang 3.6, where weak definitions of sized deallocation functions are implicitly +generated (by the compiler). You can also use the -Xclang -fno-sized-deallocation option +to disable sized deallocation. Note that both of these flags arw temporary provisions and may go away +soon.

-- 2.7.4