This patch ensures that __shared_weak_count provides a consistent vtable regardless of if RTTI is enabled or if we are targeting a static or shared libc++ build.
This patch is technically ABI breaking, but only for a very specific configuration that neither Apple nor FreeBSD should be shipping.
@dexonsmith @emaste can you confirm that you don't ship builds of libc++ that have both (A) RTTI disabled, and (B) Manually define _LIBCPP_BUILD_STATIC?
Note that _LIBCPP_BUILD_STATIC is not normally defined when building libc++.a, but instead it must be manually provided by the user or the __config_site.
If this is the right change, seems like the 0/nullptr change can be a separate NFC pre-commit.
However, I wonder if this should call std::terminate or abort or something.