libcxx fork for Darling build
Go to file
Eric Fiselier 9b0e06fbba Make vector unconditionally move elements when exceptions are disabled.
Summary:
`std::vector<T>` is free choose between using copy or move operations when it needs to resize. The standard only candidates that the correct exception safety guarantees are provided. When exceptions are disabled these guarantees are trivially satisfied. Meaning vector is free to optimize it's implementation by moving instead of copying.

This patch makes `std::vector` unconditionally move elements when exceptions are disabled.

This optimization is conforming according to the current standard wording.

There are concerns that moving in `-fno-noexceptions`mode will be a surprise to users. For example, a user may be surprised to find their code is slower with exceptions enabled than it is disabled. I'm sympathetic to this surprised, but I don't think it should block this optimization.


Reviewers: mclow.lists, ldionne, rsmith

Reviewed By: ldionne

Subscribers: zoecarver, christof, dexonsmith, libcxx-commits

Tags: #libc

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370502 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 19:01:03 +00:00
benchmarks libcxx: Rename .hpp files in libcxx/benchmarks to .h 2019-08-21 01:59:12 +00:00
cmake Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directory 2019-08-19 23:51:26 +00:00
docs [libc++] Fix typo in documentation for LIBCXX_HERMETIC_STATIC_LIBRARY 2019-08-23 19:42:09 +00:00
fuzzing Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
include Make vector unconditionally move elements when exceptions are disabled. 2019-08-30 19:01:03 +00:00
lib [libc++] Update ABI list for ABI v2 2019-06-17 19:37:26 +00:00
src Fix missing __muloti4 function with UBSAN 2019-08-21 00:16:33 +00:00
test Make vector unconditionally move elements when exceptions are disabled. 2019-08-30 19:01:03 +00:00
utils [libc++] Improve Python 3 compatibility for merge_archives.py 2019-08-23 15:05:54 +00:00
www [libc++] Implement LWG 3199 2019-08-20 18:21:06 +00:00
.arcconfig [libcxx] Set up .arcconfig to point to new Diffusion CXX repository 2017-12-04 17:55:28 +00:00
.clang-format Make clang-format use C++03 syntax 2017-04-15 02:45:43 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
appveyor-reqs-install.cmd Attempt to upgrade compiler used by appveyor builds 2019-04-03 20:40:01 +00:00
appveyor.yml disable appveyor config for MSVC 2015 2019-04-03 20:36:51 +00:00
CMakeLists.txt Revert "[libc++] Take 3: Do not cleverly link against libc++abi just because it happens to be there" 2019-08-08 00:28:06 +00:00
CREDITS.TXT Try again, this time with the correct address 2017-12-29 19:26:53 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
NOTES.TXT Reland "Use custom command and target to install libc++ headers" 2018-06-12 03:10:02 +00:00
TODO.TXT Add list of filesystem NB comments to TODO.TXT so they can be tracked separately 2017-03-06 21:23:36 +00:00

libc++ Documentation
====================

The libc++ documentation is written using the Sphinx documentation generator. It is
currently tested with Sphinx 1.1.3.

To build the documents into html configure libc++ with the following cmake options:

  * -DLLVM_ENABLE_SPHINX=ON
  * -DLIBCXX_INCLUDE_DOCS=ON

After configuring libc++ with these options the make rule `docs-libcxx-html`
should be available.