[libcxx-commits] [PATCH] D154017: Cleanup __uninitialized_temporary_buffer internals.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 29 14:53:53 PDT 2023
Mordante added inline comments.
================
Comment at: libcxx/include/new:300
+#ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+ if (__is_overaligned_for_new(__align)) {
+ const align_val_t __align_val = static_cast<align_val_t>(__align);
----------------
EricWF wrote:
> MaskRay wrote:
> > Mordante wrote:
> > > Mainly curious, but would it make sense to have this check in the Clang builtin?
> > > Mainly curious, but would it make sense to have this check in the Clang builtin?
> >
> > Which check?
> I think they mean dispatching the call to overaligned new. And I don't think so.
> The clang builtin is a very thin wrapper whose only job is to annotate the function call as "builtin" so it can be elided.
>
> Plus, I think the library has more knowledge about the availability of these functions, since we provide them.
> I think they mean dispatching the call to overaligned new. And I don't think so.
Yes that check.
> The clang builtin is a very thin wrapper whose only job is to annotate the function call as "builtin" so it can be elided.
>
> Plus, I think the library has more knowledge about the availability of these functions, since we provide them.
I assumed the compiler knows more about the required alignment. But as said, mainly curious so no request to change anything.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154017/new/
https://reviews.llvm.org/D154017
More information about the libcxx-commits
mailing list