[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 07:01:51 PST 2025
================
@@ -3625,6 +3632,21 @@ Query for this feature with ``__has_builtin(__builtin_operator_new)`` or
replaceable global (de)allocation functions, but do support calling at least
``::operator new(size_t)`` and ``::operator delete(void*)``.
+
+``__builtin_trivially_relocate``
+-----------------------------------
+
+**Syntax**:
+
+.. code-block:: c
+
+ T* __builtin_trivially_relocate(T* dest, T* src, size_t count)
+
+Trivially relocates ``count`` objects of relocatable, complete type ``T``
+from ``src`` to ``dest`` and returns ``dest``.
+This builtin is used to implement ``std::trivially_relocate``.
----------------
erichkeane wrote:
Do we need anything special for `std::trivially_relocate_at` and `std::relocate`?
https://github.com/llvm/llvm-project/pull/127636
More information about the cfe-commits
mailing list