Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if…

Authored by ahatanak on May 9 2019, 7:16 PM.


Assume __cxa_allocate_exception returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123

This patch resurrects r264998, which was committed to work around a bug
in libc++abi that was causing _cxa_allocate_exception to return a memory
that wasn't double-word aligned.


In addition, this patch makes clang issue a warning if the type of the
thrown object requires an alignment that is larger than the minimum
guaranteed by the target C++ runtime.


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

llvm-svn: 360404