diff options
author | Larisse Voufo <lvoufo@google.com> | 2015-02-14 05:42:57 +0000 |
---|---|---|
committer | Larisse Voufo <lvoufo@google.com> | 2015-02-14 05:42:57 +0000 |
commit | 5526f4f094294a7f5c63f80c0fb096ee9dbc3867 (patch) | |
tree | 3399db24241cebd9a8e07418b1c1a4daa3c851f7 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 0414b8578e8a967de9d7c5a9916816802e1d2c3b (diff) | |
download | bcm5719-llvm-5526f4f094294a7f5c63f80c0fb096ee9dbc3867.tar.gz bcm5719-llvm-5526f4f094294a7f5c63f80c0fb096ee9dbc3867.zip |
Revise the implementation logic of sized deallocation: Do not automatically generate weak definitions of the sized operator delete (in terms of unsized operator delete). Instead, provide the funcitonality via a new compiler flag, -fdef-sized-delete.
The current implementation causes link-time ODR violations when the delete symbols are exported into the dynamic table.
llvm-svn: 229241
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index ee671681b48..b060712f672 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1525,6 +1525,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, 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.DefaultSizedDelete = Opts.SizedDeallocation && + Args.hasArg(OPT_fdef_sized_delete); Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions); Opts.AccessControl = !Args.hasArg(OPT_fno_access_control); Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors); |