[libc-commits] [PATCH] D158033: [libc][NFC] Add new is_trivially_destructible check to libc's type_traits
Mikhail Ramalho via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Aug 15 15:58:07 PDT 2023
mikhail.ramalho created this revision.
mikhail.ramalho added a reviewer: michaelrj.
Herald added subscribers: libc-commits, asb.
Herald added projects: libc-project, All.
mikhail.ramalho requested review of this revision.
This patch adds new code to check if a given object is trivially
destructible. The ifdefs where necessary to implement it in gcc, as it
doesn't have the __is_trivially_destructible builtin like clang.
In gcc, it's not enough to only call __has_trivial_destructor, see:
https://stackoverflow.com/questions/20181702/which-type-traits-cannot-be-implemented-without-compiler-hooks
This patch only adds the new check, it will be used in D150211 <https://reviews.llvm.org/D150211>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158033
Files:
libc/src/__support/CPP/type_traits.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158033.550515.patch
Type: text/x-patch
Size: 5102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230815/714d4562/attachment.bin>
More information about the libc-commits
mailing list