summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorLarisse Voufo <lvoufo@google.com>2015-02-14 05:42:57 +0000
committerLarisse Voufo <lvoufo@google.com>2015-02-14 05:42:57 +0000
commit5526f4f094294a7f5c63f80c0fb096ee9dbc3867 (patch)
tree3399db24241cebd9a8e07418b1c1a4daa3c851f7 /clang/lib/Driver/Tools.cpp
parent0414b8578e8a967de9d7c5a9916816802e1d2c3b (diff)
downloadbcm5719-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/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 0f74ea176ca..fafd2145fcd 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4243,6 +4243,11 @@ 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");
+
+ // -def-sized-delete: default implementation of sized delete as a
+ // weak definition.
+ if (Args.hasArg(options::OPT_fdef_sized_delete))
+ CmdArgs.push_back("-fdef-sized-delete");
// -fconstant-cfstrings is default, and may be subject to argument translation
// on Darwin.
OpenPOWER on IntegriCloud