[libcxx-commits] [libcxx] [libc++] Add `_LIBCPP_NO_CFI` to `__allocate_unique_temporary_buffer` (PR #109682)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 23 09:08:57 PDT 2024


https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/109682

Follows up #100914. Addresses the issue revealed in https://github.com/llvm/llvm-project/pull/100914#discussion_r1771647801.

>From e4e07ae6a5460066e653e79fa9c26cf16d77e9c3 Mon Sep 17 00:00:00 2001
From: "A. Jiang" <de34 at live.cn>
Date: Tue, 24 Sep 2024 00:07:40 +0800
Subject: [PATCH] [libc++] Add `_LIBCPP_NO_CFI` to
 `__allocate_unique_temporary_buffer`

---
 libcxx/include/__memory/unique_temporary_buffer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/include/__memory/unique_temporary_buffer.h b/libcxx/include/__memory/unique_temporary_buffer.h
index b9e2a47332682f..001254e8fa4be1 100644
--- a/libcxx/include/__memory/unique_temporary_buffer.h
+++ b/libcxx/include/__memory/unique_temporary_buffer.h
@@ -47,7 +47,7 @@ template <class _Tp>
 using __unique_temporary_buffer = unique_ptr<_Tp, __temporary_buffer_deleter<_Tp> >;
 
 template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 __unique_temporary_buffer<_Tp>
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_CONSTEXPR_SINCE_CXX23 __unique_temporary_buffer<_Tp>
 __allocate_unique_temporary_buffer(ptrdiff_t __count) {
   using __deleter_type       = __temporary_buffer_deleter<_Tp>;
   using __unique_buffer_type = __unique_temporary_buffer<_Tp>;



More information about the libcxx-commits mailing list