HomeFreeBSD

libc++: avoid use of deprecated builtin

Description

libc++: avoid use of deprecated builtin

This pulls in LLVM commit accfbd4cb327411ad66c0109ba1841482b871967 to
avoid the use of __libcpp_is_trivially_relocatable.
This fixes building FreeBSD libc++ with clang HEAD as of today.

Original commit message:
[libc++] Replace __is_trivially_relocatable by is_trivially_copyable (#124970)

The __is_trivially_relocatable builtin has semantics that do not
correspond to any current or future notion of trivial relocation.
Furthermore, it currently leads to incorrect optimizations for some
types on supported compilers:

  • Clang on Windows where types with non-trivial destructors get incorrectly optimized
  • AppleClang where types with non-trivial move constructors get incorrectly optimized

Until there is an agreed upon and bugfree implementation of what it
means to be trivially relocatable, it is safer to simply use trivially
copyable instead. This doesn't leave a lot of types behind and is
definitely correct.

Reviewed by: dim
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52529

Details

Provenance
arichardsonAuthored on Sep 15 2025, 10:10 PM
Reviewer
dim
Differential Revision
D52529: libc++: avoid use of deprecated builtin
Parents
rG969be39fb3ca: if_ovpn.c: fix use of uninitialized variable
Branches
Unknown
Tags
Unknown