[all-commits] [llvm/llvm-project] f92369: [libc++] Replace __is_trivially_relocatable by is_...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Fri Feb 7 18:25:51 PST 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: f92369f2591f986c69a5b189d22da64aceb5b33d
https://github.com/llvm/llvm-project/commit/f92369f2591f986c69a5b189d22da64aceb5b33d
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2025-02-07 (Fri, 07 Feb 2025)
Changed paths:
M libcxx/include/__type_traits/is_trivially_relocatable.h
M libcxx/test/libcxx/type_traits/is_trivially_relocatable.compile.pass.cpp
A libcxx/test/std/containers/sequences/vector/trivial_relocation.pass.cpp
Log 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.
(cherry picked from commit accfbd4cb327411ad66c0109ba1841482b871967)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list