Skip to content

Commit 6e4ef79

Browse files
committed
Rebase
Created using spr 1.3.6-beta.1
2 parents 29c9bde + f37ca5c commit 6e4ef79

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

libcxx/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ set(LIBCXX_LIBRARY_VERSION "${LIBCXX_ABI_VERSION}.0" CACHE STRING
201201
For example, -DLIBCXX_LIBRARY_VERSION=x.y will result in the library being named
202202
libc++.x.y.dylib, along with the usual symlinks pointing to that. On Apple platforms,
203203
this also controls the linker's 'current_version' property.")
204-
set(LIBCXX_ABI_NAMESPACE "__${LIBCXX_ABI_VERSION}" CACHE STRING "The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
204+
set(default_abi_namespace "__${LIBCXX_ABI_VERSION}")
205+
if(NOT LIBCXX_PFP STREQUAL "none")
206+
set(default_abi_namespace "${default_abi_namespace}_pfp_${LIBCXX_PFP}")
207+
endif()
208+
set(LIBCXX_ABI_NAMESPACE "${default_abi_namespace}" CACHE STRING "The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
205209
if (NOT LIBCXX_ABI_NAMESPACE MATCHES "__.*")
206210
message(FATAL_ERROR "LIBCXX_ABI_NAMESPACE must be a reserved identifier, got '${LIBCXX_ABI_NAMESPACE}'.")
207211
endif()

libcxx/docs/CodingGuidelines.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,12 @@ Pointer field protection
200200
========================
201201

202202
To improve the effectiveness of Clang's `pointer field protection
203-
<https://clang.llvm.org/docs/StructureProtection.html>`_ feature,
204-
commonly used vocabulary types with pointer fields are marked with the
205-
``_LIBCPP_PFP`` attribute, to give Clang permission to use PFP to protect
206-
their pointer fields. Newly added vocabulary types should be marked with
207-
this attribute if they contain pointer fields.
203+
<https://clang.llvm.org/docs/StructureProtection.html>`_ feature, commonly
204+
used vocabulary types, or internal base classes or fields thereof,
205+
with pointer fields are marked with the ``_LIBCPP_PFP`` attribute, to
206+
give Clang permission to use PFP to protect their pointer fields. Newly
207+
added vocabulary types and their internal base classes or fields should
208+
be marked with this attribute if they contain pointer fields.
208209

209210
For the time being, PFP is an experimental feature, so our criteria for
210211
marking types with ``_LIBCPP_PFP`` may change.

libcxx/include/__config

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -484,21 +484,8 @@ typedef __char32_t char32_t;
484484
# define _LIBCPP_EXCEPTIONS_SIG e
485485
# endif
486486

487-
# if !_LIBCPP_HAS_EXCEPTIONS
488-
# define _LIBCPP_EXCEPTIONS_SIG n
489-
# else
490-
# define _LIBCPP_EXCEPTIONS_SIG e
491-
# endif
492-
493-
# if defined(__POINTER_FIELD_PROTECTION__)
494-
# define _LIBCPP_PFP_SIG p
495-
# else
496-
# define _LIBCPP_PFP_SIG
497-
# endif
498-
499487
# define _LIBCPP_ODR_SIGNATURE \
500-
_LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_HARDENING_SIG, _LIBCPP_EXCEPTIONS_SIG), _LIBCPP_PFP_SIG), \
501-
_LIBCPP_VERSION)
488+
_LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_HARDENING_SIG, _LIBCPP_EXCEPTIONS_SIG), _LIBCPP_VERSION)
502489

503490
// This macro marks a symbol as being hidden from libc++'s ABI. This is achieved
504491
// on two levels:

libcxx/include/string

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ private:
825825

826826
# ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
827827

828-
struct __long {
828+
struct _LIBCPP_PFP __long {
829829
__long() = default;
830830

831831
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __long(__alloc_result __alloc, size_type __size)
@@ -879,7 +879,7 @@ private:
879879
// previous definition that did not use bit fields. This is because on
880880
// some platforms bit fields have a default size rather than the actual
881881
// size used, e.g., it is 4 bytes on AIX. See D128285 for details.
882-
struct __long {
882+
struct _LIBCPP_PFP __long {
883883
__long() = default;
884884

885885
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __long(__alloc_result __alloc, size_type __size)

0 commit comments

Comments
 (0)