llvm-project/clang/test/CXX
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
..
basic Update error message text. 2015-01-18 19:05:48 +00:00
class Don't crash if a declarator in a friend decl doesn't have a name. 2015-01-16 19:34:13 +00:00
class.access Add a new flag, -fspell-checking-limit=<number> to control how many times we'll do spell checking. Note that spell checking will change the produced AST, so we don't automatically change this value when someone sets -ferror-limit=. With this, merge test typo-correction-pt2.cpp into typo-correction.cpp. 2014-12-16 21:39:02 +00:00
class.derived PR6037 2015-01-19 01:44:02 +00:00
conv PR6037 2015-01-19 01:44:02 +00:00
dcl.dcl AST: Don't ignore alignas on EnumDecls when calculating alignment 2015-01-21 10:54:38 +00:00
dcl.decl FIX PR 18432, default args, friends & late-parsed members. 2015-02-19 14:03:22 +00:00
drs C++14: Disable sized deallocation by default due to ABI breakage 2015-03-20 00:31:07 +00:00
except Emit DeferredDeclsToEmit in a DFS order. 2015-01-22 00:24:57 +00:00
expr Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
lex Add driver flags -ftrigraphs, -fno-trigraphs. 2014-12-23 22:32:37 +00:00
over Implement [over.match.oper]p3 properly, by filtering the non-candidates out 2014-04-17 01:52:14 +00:00
special Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
stmt.stmt Sema: Allow 'constexpr' variables in range loops 2015-02-18 18:34:59 +00:00
temp PR22435: Correctly implement tiebreaker for reference ordering in function 2015-02-20 04:45:22 +00:00