Commit Graph

4861 Commits

Author SHA1 Message Date
Marshall Clow
1bef51a0b5 Introduce a new test macro TEST_HAS_C11_FEATURES which is set when the underlying C library has C11 features. In C++17, we use those features. <__config> defines a similar macro, _LIBCPP_HAS_C11_FEATURES, but we don't want to use that in the library-independent parts of the tests, so define the new one. Also add a libc++-specific test to make sure the two stay in sync.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338411 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 18:23:57 +00:00
Marshall Clow
decf28e84f Code cleanup - change naked 'throw' expressions to call helpre function '__throw_future_error'. The behavior change is that if you build libc++ with exceptions disabled, and then use that in a program that sets the value of the future twice (for example), it will now abort instead of behaving unpredictably.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338332 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 23:33:48 +00:00
Tim Shen
379cbeb1a2 [libcxx] fix >> 42 UB in <experimental/simd>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338325 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 23:05:40 +00:00
Tim Shen
154f393a5c Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
...with proper guarding #ifdefs for unsupported C++11.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338318 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 22:27:38 +00:00
Tim Shen
b6244cf5af Revert "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
This reverts commit r338309.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338316 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 22:21:22 +00:00
Tim Shen
373299533a [libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.
Summary:
This patch adds a new macro _LIBCPP_HAS_NO_VECTOR_EXTENSION for detecting
whether a vector extension (\_\_attribute\_\_((vector_size(num_bytes)))) is
available.

On the top of that, this patch implements the following API:
* all constructors
* operator[]
* copy_from
* copy_to

It also defines simd_abi::native to use vector extension, if available.
In GCC and Clang, certain values with vector extension are passed by registers,
instead of memory.

Based on D41148.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits, MaskRay, lichray, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338309 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 21:23:13 +00:00
Jordan Rupprecht
8634f6fcca [libc++] Exclude posix_l/strtonum fallback inclusion for newlib > 2.4
Summary:
[libc++] Exclude posix_l/strtonum fallback inclusion for newlib > 2.4

r338122 changed the linkage of some methods which revealed an existing ODR violation, e.g.:
projects/libcxx/include/support/xlocale/__posix_l_fallback.h:83:38: error: 'internal_linkage' attribute does not appear on the first declaration of 'iswcntrl_l'
inline _LIBCPP_INLINE_VISIBILITY int iswcntrl_l(wint_t c, locale_t) {
                                     ^
lib/include/wctype.h:55:12: note: previous definition is here
extern int      iswcntrl_l (wint_t, locale_t);

These were added to newlib in 2.4 [1] [2], so move them to the already existing include guard.

[1] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=238455adfab4f8070ac65400aac22bb8a9e502fc
[2] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=8493c1631643fada62384768408852bc0fa6ff44

Reviewers: ldionne, rsmith, EricWF

Subscribers: christof, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338157 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 20:02:58 +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
7e850a8da4 Move Filesystem namespace definition out of a clang specific ifdef block.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338103 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 06:12:46 +00:00
Eric Fiselier
bc3f4035c3 Add libc++fs to the test deps, and not to the target 'cxx'.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338096 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:47:46 +00:00
Eric Fiselier
0be5527dc0 Attempt to unbreak *all the bots*
The bots were failing to build the cxx_filesystem target, so the
tests were failing. Though this does lead me to wonder how it
was ever working with c++experimental.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338095 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:42:58 +00:00
Eric Fiselier
789c372456 Correctly mark the Filesystem status as complete.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338094 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 03:16:02 +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
Petr Hosek
47d2a98a33 [CMake] Don't generate linker script only when shared library isn't statically linked
Since r337668, we support statically linking dependencies only to shared
or static library. However, that change hasn't updated the check whether
to generate a linker script. We shouldn't generate linker script only in
the case when we aren't statically linked ABI into the shared library.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338006 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 05:10:24 +00:00
Eric Fiselier
14535e3ad6 Copy LLVM CMake configuration for CMake Policy CMP0068
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338005 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 05:08:30 +00:00
Eric Fiselier
8928a12b4e Be more consistent about which bool value means an error occurred
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338002 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 04:02:06 +00:00
Eric Fiselier
d1759cf0e9 Cleanup the last_write_time internals
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338001 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 03:57:26 +00:00
Eric Fiselier
cff3d7b202 Correct comment about stat truncating st_mtimespec to seconds
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338000 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 03:42:25 +00:00
Eric Fiselier
94d2ed559a Fix attribute placement WRT extern C
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337999 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 03:36:37 +00:00
Eric Fiselier
6655abbc33 Workaround OS X 10.11 behavior where stat truncates st_mtimespec to seconds.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337998 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 03:28:48 +00:00
Eric Fiselier
8940394a74 Add print statements to help debugging
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337991 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 01:10:50 +00:00
Eric Fiselier
6b101f1be1 [libc++] Add hack to allow ubsan to work w/o compiler-rt (__muloti4 is undefined)
Summary:
Using int128_t with UBSAN causes link errors unless compiler-rt is providing the runtime library.
Specifically ubsan generates calls to __muloti4 but libgcc doesn't provide a definition.

In order to avoid this, and allow users to continue using sanitized versions of libc++, this patch introduces a hack.
It adds a cribbed version of  the compiler-rt builtin to the libc++ filesystem sources.

I don't think this approach will work in the long run, but it seems OK for now.

Also see:

https://bugs.llvm.org/show_bug.cgi?id=30643
https://bugs.llvm.org/show_bug.cgi?id=16404


Reviewers: mclow.lists, ldionne, rsmith, jyknight, echristo

Reviewed By: echristo

Subscribers: dberris, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337990 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 00:34:50 +00:00
Alex Lorenz
104b331e4c [libc++] Follow-up to r337968: use an explicit cast as suggested by Eric
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337984 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 23:59:54 +00:00
Petr Hosek
162ce3fef4 [CMake] Don't install c++abi headers in standalone libc++ build
This is a refinement on r337833. Previously we were installing two
copies of c++abi headers in libc++ build directory, one in
include/c++build and another one in include/c++/v1. However, the
second copy is unnecessary when building libc++ standalone.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337979 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 22:57:39 +00:00
Eric Fiselier
98e53227eb Work around GCC bug in constexpr function
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337976 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 22:21:47 +00:00
Eric Fiselier
39ee0c622f Fix GCC build in C++14 w/o c++14 constexpr
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337974 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 22:07:36 +00:00
Eric Fiselier
0c29afae93 Remove test which shouldn't have been committed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337971 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 21:58:37 +00:00
Eric Fiselier
d2992ce2fe Fix failing test under C++14
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337970 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 21:53:43 +00:00
Alex Lorenz
7450cbb747 [libc++] Follow-up to r337960: specify lambda's return type to avoid
-Wc++11-narrowing warning on Darwin

The internal CI produced the following diagnostic:
error: non-constant-expression cannot be narrowed from type 'long long' to '__darwin_suseconds_t' (aka 'int') in initializer list [-Wc++11-narrowing]
  struct ::timeval ConvertedTS[2] = {{TS[0].tv_sec, Convert(TS[0].tv_nsec)},
                                                    ^~~~~~~~~~~~~~~~~~~~~~


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337968 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 21:50:44 +00:00
Eric Fiselier
6ac92555a6 Make <experimental/filesystem> compile with gcc 4.8.5
Patch by Victor Zverovich.

This fixes an error when compiling `<experimental/filesystem>` with gcc 4.8.5:

```
.../libcxx/src/experimental/filesystem/filesystem_common.h:137:34:
error: redeclaration ‘T
std::experimental::filesystem::v1::detail::{anonymous}::error_value() [with T =
bool]’ d
iffers in ‘constexpr’
 constexpr bool error_value<bool>() {
                                  ^
.../libcxx/src/experimental/filesystem/filesystem_common.h:133:3:
error: from previous declaration ‘T
std::experimental::filesystem::v1::detail::{anonymous}::error_value() [with T
 = bool]’
 T error_value();
   ^
```

Reviewed as https://reviews.llvm.org/D49813


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337962 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 21:01:45 +00:00
Eric Fiselier
81872e95bf [libc++] Use __int128_t to represent file_time_type.
Summary:
The ``file_time_type`` time point is used to represent the write times for files.
Its job is to act as part of a C++ wrapper for less ideal system interfaces. The
underlying filesystem uses the ``timespec`` struct for the same purpose.

However, the initial implementation of ``file_time_type`` could not represent
either the range or resolution of ``timespec``, making it unsuitable. Fixing
this requires an implementation which uses more than 64 bits to store the
time point.

I primarily considered two solutions: Using ``__int128_t`` and using a
arithmetic emulation of ``timespec``. Each has its pros and cons, and both
come with more than one complication.

However, after a lot of consideration, I decided on using `__int128_t`. This patch implements that change.

Please see the [FileTimeType Design Document](http://libcxx.llvm.org/docs/DesignDocs/FileTimeType.html) for more information.

Reviewers: mclow.lists, ldionne, joerg, arthur.j.odwyer, EricWF

Reviewed By: EricWF

Subscribers: christof, K-ballo, cfe-commits, BillyONeal

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337960 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 20:51:49 +00:00
Louis Dionne
a1ae56c033 [libc++] Factor duplicate code into function templates
Summary:
The exact same code was replicated 11 times for implementing the basic_istream
input operators (those that don't use numeric_limits). The same code was also
duplicated twice for implementing the basic_istream input operators that take
numeric_limits into account.

This commit factors the common code into function templates to avoid
the duplication.

Reviewers: mclow.lists, EricWF

Subscribers: christof, dexonsmith, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337955 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 19:40:01 +00:00
Martin Storsjo
b52e084ca8 [windows] Fix warning about comparing ints of different signs
This fixes a warning like this:

warning: comparison of integers of different signs:
      'std::__1::__libcpp_tls_key' (aka 'long') and 'DWORD'
      (aka 'unsigned long') [-Wsign-compare]
  if (*__key == FLS_OUT_OF_INDEXES)
      ~~~~~~ ^  ~~~~~~~~~~~~~~~~~~

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337946 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 18:24:23 +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
e428b57e79 Fix diagnostic test to tolerate Clang diagnosing it as well.
Tuple has tests that ensure we diagnose non-lifetime extended
reference bindings inside tuples constructors. As of yesterday,
Clang now does this for us.

Adjust the test to tolerate the new diagnostics, while still
testing that we emit diagnostics of our own. Maybe after this
version of Clang has been adopted by most users we should
remove our diagnostics; but for now more error detection is
better!

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337905 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 11:16:39 +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
8410c8170a Fix bugs in create_directory implementation.
Libc++ was incorrectly reporting an error when the target of create_directory
already exists, but was not a directory. This behavior is not specified
in the most recent standard, which says no error should be reported.

Additionally, libc++ failed to report an error when the attribute directory
path didn't exist or didn't name a directory. This has been fixed as well.

Although it's not clear if we should call status or symlink_status on the
attribute directory. This patch chooses to still call status.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 04:46:32 +00:00
Eric Fiselier
bb00305f46 Fix missing includes in format_string.hpp helper
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337886 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 04:21:59 +00:00
Marshall Clow
d3e32d2c53 New test support for comparisons. Reviewed as https://reviews.llvm.org/D49773
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337885 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 04:21:21 +00:00
Eric Fiselier
2493db4b26 Make <experimental/filesystem> explicitly require C++11.
Previously the <experimental/filesystem> didn't guard its
contents in any dialect. However, the implementation implicitly
requires at least C++11, and the tests have always been marked
unsupported in C++03. This patch puts a header guard around the
contents to avoid exposing them before C++11.

Additionally, it replaces all of the usages of _NOEXCEPT or
_LIBCPP_CONSTEXPR with the keyword directly, since we can
expect the compiler to implement those by now.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337884 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 03:41:31 +00:00
Eric Fiselier
0fbaa11dd3 Ensure path::iterator and PathParser share the same enumeration values.
To avoid exposing implementation details, path::iterator and PathParser
both implicitly used the same set of values to represent the state,
but they were defined twice. This could have lead to a mismatch
occuring.

This patch moves all of the parser state values into the filesystem
header and changes PathParser to use those value to avoid this.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337883 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 03:31:48 +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
Marshall Clow
d2e2a0206e Mark <span> as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337879 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 01:55:25 +00:00
Petr Hosek
89d973a050 [CMake] Option to control whether shared/static library is installed
Currently it's only possible to control whether shared or static library
build of libc++, libc++abi and libunwind is enabled or disabled and
whether to install everything we've built or not. However, it'd be
useful to have more fine grained control, e.g. when static libraries are
merged together into libc++.a we don't need to install libc++abi.a and
libunwind.a. This change adds this option.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337867 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 23:27:51 +00:00
Petr Hosek
83f3cdc6a4 [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build
This is an alternative approach to r337727 which broke the build
because libc++ headers were copied into the location outside of
directories used by Clang. This change sets LIBCXX_HEADER_DIR to
different values depending on whether libc++ is being built as
part of LLVM w/ per-target multiarch runtime, LLVM or standalone.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337833 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 15:49:29 +00:00
Alexander Richardson
2be41bb90b Stop wrapping __has_include in another macro
Summary:
This is not guaranteed to work since the characters after '__has_include('
have special lexing rules that can't possibly be applied when
__has_include is generated by a macro. It also breaks the crash reproducers
generated by -frewrite-includes (see https://llvm.org/pr37990).

Reviewers: EricWF, rsmith, mclow.lists
Reviewed By: mclow.lists
Differential Revision: https://reviews.llvm.org/D49067

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337824 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 12:40:56 +00:00
Eric Fiselier
ad7e93552d Fix use of incorrect _LIBCXX macro (should be _LIBCPP).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337817 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 09:15:03 +00:00
Petr Hosek
44ef94a8c9 Reland "[CMake] Support statically linking dependencies only to shared or static library"
This is a reland of commit r337668.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337814 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 07:06:17 +00:00
Marshall Clow
39bc5e758b fix nesting of namespace and standard-version check. Also include <__config>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337809 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 03:56:38 +00:00