Add -fno-sized-deallocation option for completeness of fix in r229241 in documentation in r229818.
llvm-svn: 229950
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index f47a92b..fc6773d 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4213,6 +4213,10 @@
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))
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index edfee21..4c1ac0a 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1522,6 +1522,7 @@
Opts.NoMathBuiltin = Args.hasArg(OPT_fno_math_builtin);
Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
Opts.SizedDeallocation |= Args.hasArg(OPT_fsized_deallocation);
+ Opts.SizedDeallocation &= !Args.hasArg(OPT_fno_sized_deallocation);
Opts.DefineSizedDeallocation = Opts.SizedDeallocation &&
Args.hasArg(OPT_fdefine_sized_deallocation);
Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);