hanchenye-llvm-project/clang/www
Reid Kleckner 7ffc3fbb2f C++14: Disable sized deallocation by default due to ABI breakage
There are no widely deployed standard libraries providing sized
deallocation functions, so we have to punt and ask the user if they want
us to use sized deallocation. In the future, when such libraries are
deployed, we can teach the driver to detect them and enable this
feature.

N3536 claimed that a weak thunk from sized to unsized deallocation could
be emitted to avoid breaking backwards compatibility with standard
libraries not providing sized deallocation. However, this approach and
other variations don't work in practice.

With the weak function approach, the thunk has to have default
visibility in order to ensure that it is overridden by other DSOs
providing sized deallocation. Weak, default visibility symbols are
particularly expensive on MachO, so John McCall was considering
disabling this feature by default on Darwin. It also changes behavior
ELF linking behavior, causing certain otherwise unreferenced object
files from an archive to be pulled into the link.

Our second approach was to use an extern_weak function declaration and
do an inline conditional branch at the deletion call site. This doesn't
work because extern_weak only works on MachO if you have some archive
providing the default value of the extern_weak symbol. Arranging to
provide such an archive has the same challenges as providing the symbol
in the standard library. Not to mention that extern_weak doesn't really
work on COFF.

Reviewers: rsmith, rjmccall

Differential Revision: http://reviews.llvm.org/D8467

llvm-svn: 232788
2015-03-20 00:31:07 +00:00
..
analyzer [analyzer] www: +progress for undefbehavior.ZeroAllocDereference 2015-03-11 22:29:32 +00:00
demo
OpenProjects.html
UniversalDriver.html
builtins.py
carbon-compile.png
clang_video-05-25-2007.html
clang_video-07-25-2007.html
comparison.html
compatibility.html Switch C compilations to C11 by default. 2014-10-20 23:26:58 +00:00
content.css
cxx_compatibility.html
cxx_dr_status.html Mark DR1940 as implemented 2015-02-19 07:29:01 +00:00
cxx_status.html C++14: Disable sized deallocation by default due to ABI breakage 2015-03-20 00:31:07 +00:00
diagnostics.html
favicon.ico
feature-compile1.png
feature-compile2.png
feature-memory1.png
features.html
get_involved.html Tweak documentation. 2014-06-12 21:15:10 +00:00
get_started.html
hacking.html Tweak documentation. 2014-06-12 21:15:10 +00:00
index.html
libstdc++4.4-clang0x.patch
libstdc++4.6-clang11.patch
libstdc++4.7-clang11.patch
make_cxx_dr_status Update cxx_dr_status.html after 3.6 branch 2015-01-14 18:14:00 +00:00
menu.css Fix a menu issue. patch by Vassil Vassilev 2015-03-09 09:09:55 +00:00
menu.html.incl Add a download link to the web page (PR22764) 2015-03-06 00:13:55 +00:00
related.html
robots.txt