124 Commits

Author SHA1 Message Date
Louis Dionne
f01e82fd42 [libcxx] Remove the availability_markup LIT feature
It is now equivalent to the 'availability' LIT feature, so there's no
reason to keep both.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348653 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-07 21:48:39 +00:00
Louis Dionne
5fe0a6a0bc [libc++] Improve diagnostics for non-const comparators and hashers in associative containers
Summary:
When providing a non-const-callable comparator in a map or set, the
warning diagnostic does not include the point of instantiation of
the container that triggered the warning, which makes it difficult
to track down the problem. This commit improves the diagnostic by
placing it directly in the body of the associative container.

The same change is applied to unordered associative containers, which
had a similar problem.

Finally, this commit cleans up the forward declarations of several
map and unordered_map helpers, which are not needed anymore.

<rdar://problem/41370747>

Reviewers: EricWF, mclow.lists

Subscribers: christof, dexonsmith, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348529 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-06 21:46:17 +00:00
Louis Dionne
bf62394ab6 [libcxx] Always enable availability in the lit test suite.
Summary:
Running the tests without availability enabled doesn't really make sense:
availability annotations allow catching errors at compile-time instead
of link-time. Running the tests without availability enabled allows
confirming that a test breaks at link-time under some configuration,
but it is more useful to instead check that it should fail at compile-time.

Always enabling availability in the lit test suite will greatly simplify
XFAILs and troubleshooting of failing tests, which is currently a giant
pain because we have these two levels of possible failure: link-time and
compile-time.

Reviewers: EricWF, mclow.lists

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348296 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-04 19:31:08 +00:00
Louis Dionne
c28aca18e5 [libcxx] Remove bad_array_length
Summary:
std::bad_array_length was added by n3467, but this never made it into C++.
This commit removes the definition of std::bad_array_length from the headers
AND from the shared library. See the comments in the ABI changelog for details
about the ABI implications of this change.

Reviewers: mclow.lists, dexonsmith, howard.hinnant, EricWF

Subscribers: christof, jkorous, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347903 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-29 19:44:57 +00:00
Louis Dionne
581671fd26 [libcxx] Remove dynarray
Summary:
std::dynarray had been proposed for C++14, but it was pulled out from C++14
and there are no plans to standardize it anymore.

Reviewers: mclow.lists, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347783 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-28 18:02:00 +00:00
Louis Dionne
ee720ea18f [NFC] Fix formatting in availability documentation
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347362 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-20 23:07:01 +00:00
Louis Dionne
1e04e9b111 [libcxx] Mention restriction on inline namespaces in LIBCXX_ABI_NAMESPACE docs
I also kept the original "vague" documentation that saying that users are
responsible for not breaking us. This doesn't mean anything because there's
no way they can actually enforce that unless we restrict ourselves to a
specific naming scheme, but I left the documentation because it acts as a
good warning and gives us more leeway.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347052 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-16 14:57:47 +00:00
Eric Fiselier
b124ade497 Rename cxx-benchmark-unittests target and convert to LIT.
This patch renames the cxx-benchmark-unittests to check-cxx-benchmarks
and converts the target to use LIT in order to make the tests run faster
and provide better output.

In particular this runs each benchmark in a suite one by one, allowing
more parallelism while ensuring output isn't garbage with multiple threads.

Additionally, it adds the CMake flag '-DLIBCXX_BENCHMARK_TEST_ARGS=<list>'
to specify what options are passed when running the benchmarks.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-14 20:38:46 +00:00
Eric Fiselier
e6f91d8017 Make libc++'s versioning namespace customizable
Summary:
This patch makes the versioning namespace libc++ uses customizable by the user using `-DLIBCXX_ABI_NAMESPACE=__foo`. 

This allows users to build custom versions of libc++ which can be linked into binaries with other libc++ versions without causing symbol conflicts or ODR issues. 

Reviewers: mclow.lists, ldionne

Reviewed By: ldionne

Subscribers: kristina, smeenai, mgorny, phosek, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345657 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 21:44:53 +00:00
Louis Dionne
640fa255b9 [libc++] Use exclude_from_explicit_instantiation instead of always_inline
Summary:
This commit adopts the exclude_from_explicit_instantiation attribute discussed
at [1] and reviewed in [2] in libc++ to supplant the use of __always_inline__
for visibility purposes.

This change means that users wanting to link together translation units built
with different versions of libc++'s headers into the same final linked image
MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1 when building those
TUs. Doing otherwise will lead to ODR violations and ABI issues.

[1]: http://lists.llvm.org/pipermail/cfe-dev/2018-August/059024.html
[2]: https://reviews.llvm.org/D51789

Reviewers: rsmith, EricWF

Subscribers: dexonsmith, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345516 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-29 17:30:04 +00:00
Louis Dionne
07f95bd10d [libc++] Make sure we can build libc++ with -fvisibility=hidden
Summary:
When building with -fvisibility=hidden, some symbols do not get exported from
libc++.dylib. This means that some entities are not explicitly given default
visibility in the source code, and that we rely on the fact -fvisibility=default
is the default. This commit explicitly gives default visibility to those
symbols to avoid being dependent on the command line flags used.

The commit also remove symbols from the dylib -- those symbols do not
actually need to be exported from the dylib and this should not be an
ABI break.

Finally, in the future, we may want to mark the whole std:: namespace as
having hidden visibility (to switch from opt-out to opt-in), in which
case the changes done in this commit will be required.

Reviewers: EricWF

Subscribers: mgorny, christof, dexonsmith, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345260 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-25 12:13:43 +00:00
Louis Dionne
9bc5d8e1ba [libcxx] Remove custom CMake code targeting Mac OS 10.6
libc++ has dropped support for Mac OS 10.6 for a while, and we don't
have any testers set up for that OS.

This commit puts in an error message so that people can reach out to
the libc++ maintainers in case support for 10.6 is still expected (as
opposed to silently failing in weird ways). We can completely drop
support for 10.6 and remove the error message some time in the future
when we're sure that nobody is relying on it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344576 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-16 00:31:32 +00:00
Louis Dionne
13cf3b9b36 [libc++] Add deprecated attributes to many deprecated components
Summary:
These deprecation warnings are opt-in: they are only enabled when the
_LIBCXX_DEPRECATION_WARNINGS macro is defined, which is not the case
by default. Note that this is a first step in the right direction, but
I wasn't able to get an exhaustive list of all deprecated components
per standard, so there's certainly stuff that's missing. The list of
components this commit marks as deprecated is:

in C++11:
- auto_ptr, auto_ptr_ref
- binder1st, binder2nd, bind1st(), bind2nd()
- pointer_to_unary_function, pointer_to_binary_function, ptr_fun()
- mem_fun_t, mem_fun1_t, const_mem_fun_t, const_mem_fun1_t, mem_fun()
- mem_fun_ref_t, mem_fun1_ref_t, const_mem_fun_ref_t, const_mem_fun1_ref_t, mem_fun_ref()

in C++14:
- random_shuffle()

in C++17:
- unary_negate, binary_negate, not1(), not2()

<rdar://problem/18168350>

Reviewers: mclow.lists, EricWF

Subscribers: christof, dexonsmith, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342843 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-23 18:35:00 +00:00
Eric Fiselier
3cea452823 Correct docs to reference the new libc++ lists.
We recently added libcxx-dev and libcxx-commits mailing lists.
This patch updates the libc++ documentation to correctly reference
the libc++ lists instead of the old Clang ones.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342816 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-22 19:49:29 +00:00
Roman Lebedev
caf40ae419 [libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a [[nodiscard]]
Summary:
The `[[nodiscard]]` attribute is intended to help users find bugs where
function return values are ignored when they shouldn't be. After C++17 the
C++ standard has started to declared such library functions as `[[nodiscard]]`.
However, this application is limited and applies only to dialects after C++17.
Users who want help diagnosing misuses of STL functions may desire a more
liberal application of `[[nodiscard]]`.

For this reason libc++ provides an extension that does just that! The
extension must be enabled by defining `_LIBCPP_ENABLE_NODISCARD`. The extended
applications of `[[nodiscard]]` takes two forms:

1. Backporting `[[nodiscard]]` to entities declared as such by the
   standard in newer dialects, but not in the present one.

2. Extended applications of `[[nodiscard]]`, at the libraries discretion,
   applied to entities never declared as such by the standard.

Users may also opt-out of additional applications `[[nodiscard]]` using
additional macros.

Applications of the first form, which backport `[[nodiscard]]` from a newer
dialect may be disabled using macros specific to the dialect it was added. For
example `_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17`.

Applications of the second form, which are pure extensions, may be disabled
by defining `_LIBCPP_DISABLE_NODISCARD_EXT`.

This patch was originally written by me (Roman Lebedev),
then but then reworked by Eric Fiselier.

Reviewers: mclow.lists, thakis, EricWF

Reviewed By: thakis, EricWF

Subscribers: llvm-commits, mclow.lists, lebedev.ri, EricWF, rjmccall, Quuxplusone, cfe-commits, christof

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342808 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-22 17:54:48 +00:00
Sylvestre Ledru
8f4c8e666e fix some typos in the doc
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342628 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 08:05:01 +00:00
Sylvestre Ledru
ac2b5703bb refresh the libc++ homepage
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342624 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 07:57:31 +00:00
Hans Wennborg
5a86ba0aa0 ReleaseNotes: update links to use https
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341789 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-10 08:57:12 +00:00
Louis Dionne
6969dc114e [libc++] Add a link to the Release notes from the main libc++ documentation
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341551 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-06 15:05:43 +00:00
Louis Dionne
fa8c5393b4 [libcxx] Add ReleaseNotes.rst file for release notes
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341550 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-06 14:46:22 +00:00
Louis Dionne
61b0a0088b [libcxx] By default, do not use internal_linkage to hide symbols from the ABI
Summary:
https://reviews.llvm.org/D49240 led to symbol size problems in Chromium, and
we expect this may be the case in other projects built in debug mode too.
Instead, unless users explicitly ask for internal_linkage, we use always_inline
like we used to.

In the future, when we have a solution that allows us to drop always_inline
without falling back on internal_linkage, we can replace always_inline by
that.

Note that this commit introduces a change in contract for existing libc++
users: by default, libc++ used to guarantee that TUs built with different
versions of libc++ could be linked together. With the introduction of the
_LIBCPP_HIDE_FROM_ABI_PER_TU macro, the default behavior is that TUs built
with different libc++ versions are not guaranteed to link. This is a change
in contract but not a change in behavior, since the current implementation
still allows linking TUs built with different libc++ versions together.

Reviewers: EricWF, mclow.lists, dexonsmith, hans, rnk

Subscribers: christof, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339874 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-16 12:44:28 +00:00
Louis Dionne
5ae92f0055 [libc++] Add the _LIBCPP_HIDE_FROM_ABI_AFTER_V1 macro
Summary:
This macro allows hiding symbols from the ABI when the library is built
with an ABI version after ABI v1, which is currently the only stable ABI.
This commit defines `_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY` to be
`_LIBCPP_HIDE_FROM_ABI_AFTER_V1`, meaning that symbols that were only
exported by the library for historical reasons are not exported anymore
in the unstable ABI.

Because of that, this commit is an ABI break for ABI v2. This ABI version
is not stable, however, so this should not be a problem.

Reviewers: EricWF, mclow.lists

Subscribers: christof, dexonsmith, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339012 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 14:11:50 +00:00
Hans Wennborg
db9b3d81a4 Update version to 8.0.0svn: cmake, includes files and docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338555 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 13:54:28 +00:00
Louis Dionne
67fff22b9a [libc++] Introduce _LIBCPP_HIDE_FROM_ABI to replace _LIBCPP_INLINE_VISIBILITY
Summary:
This commit introduces a new macro, _LIBCPP_HIDE_FROM_ABI, whose goal is to
mark functions that shouldn't be part of libc++'s ABI. It marks the functions
as being hidden for dylib visibility purposes, and as having internal linkage
using Clang's __attribute__((internal_linkage)) when available, and
__always_inline__ otherwise.

It replaces _LIBCPP_INLINE_VISIBILITY, which was always using __always_inline__
to achieve similar goals, but suffered from debuggability and code size problems.
The full proposal, along with more background information, can be found here:

    http://lists.llvm.org/pipermail/cfe-dev/2018-July/058419.html

This commit does not rename uses of _LIBCPP_INLINE_VISIBILITY to
_LIBCPP_HIDE_FROM_ABI: this wide reaching but mechanical change can
be done later when we've confirmed we're happy with the new macro.

In the future, it would be nice if we could optionally allow dropping
any internal_linkage or __always_inline__ attribute, which could result
in code size improvements. However, this is currently impossible for
reasons explained here: http://lists.llvm.org/pipermail/cfe-dev/2018-July/058450.html

Reviewers: EricWF, dexonsmith, mclow.lists

Subscribers: christof, dexonsmith, llvm-commits, mclow.lists

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338122 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 12:46:03 +00:00
Eric Fiselier
a0866c5fb5 Implement <filesystem>
This patch implements the <filesystem> header and uses that
to provide <experimental/filesystem>.

Unlike other standard headers, the symbols needed for <filesystem>
have not yet been placed in libc++.so. Instead they live in the
new libc++fs.a library. Users of filesystem are required to link this
library. (Also note that libc++experimental no longer contains the
definition of <experimental/filesystem>, which now requires linking libc++fs).

The reason for keeping <filesystem> out of the dylib for now is that
it's still somewhat experimental, and the possibility of requiring an
ABI breaking change is very real. In the future the symbols will likely
be moved into the dylib, or the dylib will be made to link libc++fs automagically).

Note that moving the symbols out of libc++experimental may break user builds
until they update to -lc++fs. This should be OK, because the experimental
library provides no stability guarantees. However, I plan on looking into
ways we can force libc++experimental to automagically link libc++fs.

In order to use a single implementation and set of tests for <filesystem>, it
has been placed in a special `__fs` namespace. This namespace is inline in
C++17 onward, but not before that. As such implementation is available
in C++11 onward, but no filesystem namespace is present "directly", and
as such name conflicts shouldn't occur in C++11 or C++14.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338093 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:07:09 +00:00
Louis Dionne
d9cfbf1a89 [NFC] Fix grammatical mistakes in libc++ FileTimeType design docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337925 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 13:40:49 +00:00
Eric Fiselier
ed7123bdc2 Fix another typo in the FileTimeType docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337900 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 10:22:07 +00:00
Eric Fiselier
f562b9b331 Fix typos, spelling, and grammar in the FileTimeType design docs.
I'm sure I'll discover more mistakes as I go on...

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337897 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 10:17:04 +00:00
Eric Fiselier
88dfb6d532 Add design docs for upcoming file_time_type change.
In upcoming changes to filesystem I plan to change file_time_type
to use __int128_t as its underlying representation, in order
to allow it to have a range and resolution at least that of
the timespec struct.

There was some pushback against this decision, so I drafted
a document explaining the problems, potential solutions, and
the rational for the decision.

However, it's probably easier to let people read the generated
HTML rather than the raw restructured text. For this reason
I'm commiting the design documents before hand, so they can
be available during any subsequent discussion or code review.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337880 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 02:53:53 +00:00
Louis Dionne
54238057d6 [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary:
We never actually mean to always inline a function -- all the uses of
the macro I could find are actually attempts to control the visibility
of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which
is actually always defined the same.

This change is orthogonal to the decision of what we're actually going
to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by
having one canonical way of doing things.

Note that this commit had originally been applied in r336369 and then
reverted in r336382 because of unforeseen problems. Both of these problems
have now been fixed.

Reviewers: EricWF, mclow.lists

Subscribers: christof, dexonsmith, erikvanderpoel

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336866 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 23:14:33 +00:00
Louis Dionne
4e7ffcaae6 Revert "[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY"
This reverts commit r336369. The commit had two problems:
1. __pbump was marked as _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY instead of
   _LIBCPP_INLINE_VISIBILITY, which lead to two symbols being added in the
   dylib and the check-cxx-abilist failing.

2. The LLDB tests started failing because they undefine
   `_LIBCPP_INLINE_VISIBILITY`. I need to figure out why they do that and
   fix the tests before we can go forward with this change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336382 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-05 18:41:50 +00:00
Louis Dionne
79aa4f32d0 [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary:
We never actually mean to always inline a function -- all the uses of
the macro I could find are actually attempts to control the visibility
of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which
is actually always defined the same.

This change is orthogonal to the decision of what we're actually going
to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by
having one canonical way of doing things.

Reviewers: EricWF

Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336369 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-05 16:49:38 +00:00
Bruce Mitchener
e89a34f66a Fix typos.
Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324989 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-13 08:12:00 +00:00
Martin Storsjo
16eb426933 [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads
This allows keeping libcxx using win32 threads even if a
version of pthread.h is installed.

This matches the existing cmake option LIBCXX_HAS_PTHREAD_API.

Also add missing documentation about the internal define
_LIBCPP_HAS_THREAD_API_WIN32.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321896 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-05 20:48:29 +00:00
Hans Wennborg
ac3c89d6a3 Update version to 7.0.0svn: cmake, include files and docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321725 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03 15:40:29 +00:00
Hamza Sood
9627e9b9f4 Corrected a typo in the building libc++ docs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319631 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-03 10:18:35 +00:00
Eric Fiselier
7e73ea873f Teach test suite about C++2a dialect flag.
This patch teaches the test suite configuration about the -std=c++2a
flag. And, since it's the newest dialect, change the test suite to
choose it, if possible, by default.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:26:23 +00:00
Eric Fiselier
6efb1c19a7 Change test suite to support c++17 dialect flag instead of c++1z.
This patch changes the test suite to attempt and prefer -std=c++17 over
-std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers
to refer to c++17 over c++1z.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@317610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:20:58 +00:00
Shoaib Meenai
18dba06924 [libc++] Support Microsoft ABI without vcruntime headers
The vcruntime headers are hairy and clash with both libc++ headers
themselves and other libraries. libc++ normally deals with the clashes
by deferring to the vcruntime headers and silencing its own definitions,
but for clients which don't want to depend on vcruntime headers, it's
desirable to support the opposite, i.e. have libc++ provide its own
definitions.

Certain operator new/delete replacement scenarios are not currently
supported in this mode, which requires some tests to be marked XFAIL.
The added documentation has more details.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315234 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-09 19:25:17 +00:00
Shoaib Meenai
2bba98eea0 [libc++] Add site config option for ABI macros
Some ABI macros affect headers, so it's nice to have a site config
option for them. Add a LIBCXX_ABI_DEFINES cmake macro to allow
specifying a list of ABI macros to define in the site config.

The primary design constraint (as discussed with Eric on IRC a while
back) was to not have to repeat the ABI macro names in cmake, which only
leaves a free-form cmake list as an option. A somewhat unfortunate
consequence is that we can't verify that the ABI macros being defined
actually exist, though we can at least perform some basic sanity
checking, since all the ABI macros begin with _LIBCPP_ABI_.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314946 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04 23:17:12 +00:00
Hans Wennborg
2d17369ac6 Bump docs version to 6.0
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@308462 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19 13:46:11 +00:00
Shoaib Meenai
b58dd3d4f4 [libc++] class template -> template class. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307972 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 22:08:59 +00:00
Shoaib Meenai
cd75b288ca [libc++] Mark string operator+ _LIBCPP_FUNC_VIS
It has an extern template instantiation declaration in the headers and a
corresponding instantiation definition in the library, so we must mark
it with _LIBCPP_FUNC_VIS to make it available outside the library.

This doesn't cause any ABI changes as-is since we don't build libc++
with hidden visibility (so the function is exported anyway). It's needed
for building libc++ with hidden visibility, however.

Clarify the Windows behavior for extern function templates while I'm
here, since this exercises that behavior.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307966 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 21:35:52 +00:00
Shoaib Meenai
a3c3d5f6c1 [libc++] Use proper template terminology. NFC
It's supposed to be "class template" and "function template" instead of
"template class" and "template function".

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307954 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 20:47:24 +00:00
Petr Hosek
347be61138 [libcxx][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307615 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-11 02:39:50 +00:00
Eric Fiselier
01c2bb3677 Fix misspelling of environment throughout libc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302600 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09 23:47:20 +00:00
Tom Stellard
867ae29929 docs: Fix Sphinx detection with out-of-tree builds
Adapt to changes made in r302499.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302517 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09 11:18:03 +00:00
Mehdi Amini
907c1196a7 Add markup for libc++ dylib availability
Libc++ is used as a system library on macOS and iOS (amongst others). In order
for users to be able to compile a binary that is intended to be deployed to an
older version of the platform, clang provides the
availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_
that can be placed on declarations to describe the lifecycle of a symbol in the
library.

See docs/DesignDocs/AvailabilityMarkup.rst for more information.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 17:08:54 +00:00
Eric Fiselier
b8577430ea Update Appveyor bot link to point to new llvm-mirror Appveyor account
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302128 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 07:40:23 +00:00
Eric Fiselier
3c51b64ddc update buildbot doc to link to the new Appveyor builders
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302116 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 05:58:59 +00:00