[all-commits] [llvm/llvm-project] c0cde7: [libc++] Remove C++03 extensions for std::allocato...

Louis Dionne via All-commits all-commits at lists.llvm.org
Sun Mar 19 07:15:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0cde79e9e3b3c5bb54c55b0eabe8142674028a4
      https://github.com/llvm/llvm-project/commit/c0cde79e9e3b3c5bb54c55b0eabe8142674028a4
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-03-19 (Sun, 19 Mar 2023)

  Changed paths:
    M libcxx/docs/ReleaseNotes.rst
    M libcxx/include/__memory/allocator_arg_t.h
    M libcxx/include/__mutex_base
    M libcxx/include/__utility/piecewise_construct.h
    M libcxx/include/condition_variable
    M libcxx/include/experimental/__memory
    M libcxx/include/future
    M libcxx/include/mutex
    M libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_adopt_lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_defer_lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp
    M libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp
    M libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp

  Log Message:
  -----------
  [libc++] Remove C++03 extensions for std::allocator_arg & friends

As explained in the release note, libc++ used to provide various
global variables as an extension in C++03 mode. Unfortunately, that
made our definition non-conforming in all standard modes. This was
never a big problem until recently, since we are trying to support
C++20 Modules in libc++, and that requires cleaning up the definition
of these variables.

This change is the first in a series of changes to achieve our end goal.
This patch removes the ability for users to rely on the (incorrect)
definition of those global variables inside the shared library. The
plan is to then remove those definitions from the shared library
(which is an ABI break but I don't think it will have impact), and
finally to make our definition of those variables conforming in all
standard modes.

Differential Revision: https://reviews.llvm.org/D145422




More information about the All-commits mailing list