forked from OSchip/llvm-project
7ffc3fbb2f
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 |
||
---|---|---|
.. | ||
Inputs | ||
11-27-2007-FloatLiterals.c | ||
badstring_in_if0.c | ||
bcpl-escaped-newline.c | ||
block_cmt_end.c | ||
builtin_redef.c | ||
c90.c | ||
char-escapes.c | ||
char-literal-encoding-error.c | ||
char-literal.cpp | ||
comment-escape.c | ||
conflict-marker.c | ||
constants.c | ||
counter.c | ||
cross-windows-on-linux-default.cpp | ||
cross-windows-on-linux.cpp | ||
cxx-features.cpp | ||
cxx0x_keyword_as_cxx98.cpp | ||
cxx0x_raw_string_delim_length.cpp | ||
cxx0x_raw_string_directives.cpp | ||
cxx0x_raw_string_unterminated.cpp | ||
cxx1y_binary_literal.cpp | ||
cxx1y_digit_separators.cpp | ||
cxx1z-trigraphs.cpp | ||
digraph.c | ||
dollar-idents.c | ||
eof-char.c | ||
eof-file.c | ||
eof-string.c | ||
escape_newline.c | ||
gnu-flags.c | ||
has_extension.c | ||
has_extension_cxx.cpp | ||
has_feature_address_sanitizer.cpp | ||
has_feature_c1x.c | ||
has_feature_cxx0x.cpp | ||
has_feature_exceptions.cpp | ||
has_feature_memory_sanitizer.cpp | ||
has_feature_modules.m | ||
has_feature_objc_arc.m | ||
has_feature_rtti.cpp | ||
has_feature_thread_sanitizer.cpp | ||
has_feature_type_traits.cpp | ||
header.cpp | ||
hexfloat.cpp | ||
keywords_test.c | ||
keywords_test.cpp | ||
long-long.cpp | ||
ms-compatibility.c | ||
ms-extensions.c | ||
ms-extensions.cpp | ||
msdos-cpm-eof.c | ||
multiple-include.c | ||
newline-eof-c++98-compat.cpp | ||
newline-eof.c | ||
numeric-literal-trash.c | ||
pragma-mark.c | ||
pragma-message.c | ||
pragma-message2.c | ||
pragma-operators.cpp | ||
pragma-region.c | ||
preamble.c | ||
rdar-8914293.c | ||
rdr-6096838-2.c | ||
rdr-6096838.c | ||
string-literal-encoding.c | ||
string-literal-errors.cpp | ||
string_concat.cpp | ||
token-concat.c | ||
token-concat.cpp | ||
unicode-strings.c | ||
unicode.c | ||
unknown-char.c | ||
utf-16.c | ||
utf-16.c.txt | ||
utf8-char-literal.cpp | ||
utf8-invalid.c | ||
warn-date-time.c | ||
wchar-signedness.c | ||
wchar.c |