Currently, these types are all always passed indirectly, because they
have non-trivial special members. With this patch, we'll pass them in
registers instead under the libc++ unstable ABI when using a recent
Clang.
This has a small impact on observable behavior: the destructor will be
run in the callee rather than in the caller, which means
- the pointee type of unique_ptr<T> must be complete in the context of a function definition that takes such a pointer by value, and
- the order in which destructors for parameters are run is not strictly in reverse construction order.
This still needs some performance testing and (since it's technically
non-conforming due to the above) should be put behind a flag, but I'm
mailing it out now to test the waters for this kind of change.
This depends on D63744 (though that dependence could be removed with
some changes to __compressed_pair).
I'm trying to keep all of the ABI configuration in the same place at the top of the file.
Could you give this a descriptive name like _LIBCPP_ABI_ENABLE_TRIVIAL_ABI_ATTRIBUTE and then use that here to configure _LIBCPP_TRIVIAL_ABI?