r280944 attempted to add both inline and _LIBCPP_INLINE_VISIBILITY to basic_string's destructor in order to achieve better inlining behavior. Unfortunately applying _LIBCPP_INLINE_VISIBILITY to the destructor triggers a Clang bug. This patch attempts to still get better inlining behavior while working around the Clang bug by simply applying inline without the attribute.
Unfortunately applying only inline causes the destructor to be inlined at -O2 or greater whereas the attribute results in inlining at all optimization levels. However this is still better than no inlining at all. See https://godbolt.org/g/8UbKwb for example assembly.
My only concern with this patch is marking the function as inline without making the visibility hidden. I don't think that should have any weird consequences but I'm not 100%.