hanchenye-llvm-project/libcxx
Shoaib Meenai c7cd73e8b8 [libc++] Add a key function for bad_function_call
Summary:
bad_function_call is currently an empty class, so any object files using
that class will end up with their own copy of its typeinfo, typeinfo
name and vtable, leading to unnecessary duplication that has to be
resolved by the dynamic linker. Instead, give bad_function_call a key
function and put a definition for that key function in libc++ itself, to
centralize the typeinfo and vtable.

This is consistent with the behavior for other exception classes. The
key functions are defined in libc++ rather than libc++abi since the
class is defined in the libc++ versioning namespace, so ABI
compatibility with libstdc++ is not a concern.

Guard this change behind an ABI macro, since it isn't backwards
compatible (i.e., clients built against the new libc++ headers wouldn't
be able to run against an older libc++ library).

Reviewers: mclow.lists, EricWF

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D27387

llvm-svn: 298937
2017-03-28 19:33:31 +00:00
..
benchmarks improve performance of string::find 2016-12-30 18:01:36 +00:00
cmake Fix cmake to find the compiler-rt libs on darwin 2017-03-14 04:12:29 +00:00
docs [libc++] Make _LIBCPP_TYPE_VIS export members 2017-03-02 03:22:18 +00:00
include [libc++] Add a key function for bad_function_call 2017-03-28 19:33:31 +00:00
lib [libc++] Add a key function for bad_function_call 2017-03-28 19:33:31 +00:00
src [libc++] Add a key function for bad_function_call 2017-03-28 19:33:31 +00:00
test Mark *pass tests as UNUSUPPORTED instead of XFAIL on old compilers 2017-03-27 10:44:33 +00:00
utils Add deployment knobs to tests (for Apple platforms) 2017-03-15 00:59:54 +00:00
www Implement P0298R3: 'std::byte'. Reviewed as https://reviews.llvm.org/D31022 2017-03-24 05:45:39 +00:00
.arcconfig
.clang-format Tweak .clang-format configuration. 2017-01-14 05:43:02 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt [libc++] Fix some comment typos 2017-03-25 03:42:20 +00:00
CREDITS.TXT Updated email address in `CREDITS.txt`. 2017-03-06 20:46:55 +00:00
LICENSE.TXT Update year to 2017 2017-01-03 11:20:43 +00:00
NOTES.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00
TODO.TXT Add list of filesystem NB comments to TODO.TXT so they can be tracked separately 2017-03-06 21:23:36 +00:00