summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* Add special case for finding the in-tree ABI library.Eric Fiselier2014-10-181-6/+13
| | | | | | | | When libcxx is built in-tree with libcxxabi it links against libcxxabi using the name of the cmake target and not the actual library name. The cmake target will not work with `find_library()`, so it needs special case handling. llvm-svn: 220121
* [libcxx] Add support for building and testing with an ABI library not along ↵Eric Fiselier2014-10-185-106/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | linker paths Summary: This patch adds support for building/testing libc++ with an ABI library that the linker would not normally find. - `CMAKE_LIBRARY_PATH` is used to specify the list of search directories. - The ABI library is now found using `find_library` instead of assuming its along the linker's search path. - `CMAKE_LIBRARY_PATH` is passed to our LIT config as `library_paths`. - For each path in `library_paths` the following flags are added `-L<path> -Wl,-rpath -Wl,<path>` Some changes in existing behavior were also added: - `target_link_libraries` is now passed the ABI library file instead of the library name. Ex `target_link_libraries(cxx "/usr/lib/libc++abi.so")` vs `target_link_libraries(cxx "c++abi")`. - `-Wl,-rpath -Wl,<path>` is now used on OSX to link to libc++ instead of env['DYLD_LIBRARY_PATH'] if `use_system_lib=False`. Reviewers: mclow.lists, danalbert, EricWF Reviewed By: EricWF Subscribers: emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D5038 llvm-svn: 220118
* [libcxx] Fix SFINAE in <cmath>. Patch from K-Ballo.Eric Fiselier2014-10-173-34/+183
| | | | | | | | Delay instantiation of `__numeric_type` within <cmath>, don't instantiate it when the `is_arithmetic` conditions do not hold as it causes errors with user-defined types with ambiguous conversions. Fixes PR21083. llvm-svn: 219998
* [libcxx] Add support for LLVM_USE_SANITIZER=UndefinedEric Fiselier2014-10-162-0/+8
| | | | | | | LLVM_USE_SANITIZER=Undefined support was added to the LLVM CMake configuration. Update libc++'s handling of LLVM_USE_SANITIZER to support this as well. llvm-svn: 219987
* Fix bad link in documentation. Thanks to rsmithEric Fiselier2014-10-161-1/+1
| | | | llvm-svn: 219898
* Add my buildbot to list of libc++ buildbots in documentationEric Fiselier2014-10-161-0/+3
| | | | llvm-svn: 219894
* Fixes PR21157 'tuple: non-default constructible tuple hard failure' Thanks ↵Marshall Clow2014-10-154-11/+87
| | | | | | to Louis Dionne for the bug report and the patch. llvm-svn: 219785
* Fix for PR 19616: 'tuple_cat of nested tuples fails in noexcept ↵Marshall Clow2014-10-073-7/+43
| | | | | | specification'. Thanks to Louis Dionne for the fix. llvm-svn: 219243
* Fix win32 support header for mingw32.Dan Albert2014-10-061-0/+3
| | | | | | These functions are defined as static in the mingw32 headers. llvm-svn: 219140
* Mark module atomic as cplusplus11.Nico Weber2014-09-241-0/+1
| | | | | | | | | | | | | With clang, the header atomic requires __has_feature(cxx_atomic), which is only true in c++11 mode. Because of this, when using modules in c++98 with libc++ compilation of the std module would fail without this change, PR21002. (With gcc, only gcc4.7+ is needed, no c++11. But gcc doesn't have modules yet, and the module.modulemap language can't express things like "this is only required if the compiler is clang". If gcc gets module support, we'd probably have a module.modulemap file for each compiler that libc++ supports?) llvm-svn: 218372
* [libcxx] Fix installation of ABI headers. Fixes PR20936Eric Fiselier2014-09-231-4/+4
| | | | | | | | | | | | | | | | | | Summary: I changed the build so that each ABI header gets its own install rule. This gives us the flexibility to install different headers in different directories. This also fixes the problem where libstdc++ bits/<header>'s were not being installed under a bits directory. Test Plan: I tested this patch on linux against libstdc++ and libcxxabi. Reviewers: danalbert, mclow.lists, jroelofs Reviewed By: jroelofs Subscribers: jhunold, cfe-commits Differential Revision: http://reviews.llvm.org/D5454 llvm-svn: 218309
* Fix some type-traits (is_assignable, etc) dealing with classes that take ↵Marshall Clow2014-09-226-9/+39
| | | | | | non-const references as 'right hand side'. Add tests. Fixes PR# 20836 llvm-svn: 218286
* Support newlib as libc++'s C library [locale part]Jonathan Roelofs2014-09-194-169/+271
| | | | | | http://reviews.llvm.org/D5385 llvm-svn: 218144
* Fix PR#20843: binomial_distribution<unsigned> is broken. Add test to ensure ↵Marshall Clow2014-09-172-1/+15
| | | | | | that signed and unsigned verstions produce the same sequence. llvm-svn: 217976
* Fix char_traits functions for GCC compatibility.Dan Albert2014-09-171-104/+52
| | | | | | | | GCC 4.9 fails to inline these functions at -O1 because they are used indirectly. Declare them as inline instead of always_inline. Discussion in GCC bugreport: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63220 llvm-svn: 217961
* Add include of <cassert> for the operator commaMarshall Clow2014-09-171-0/+1
| | | | llvm-svn: 217938
* K-ballo pointed out *another* mistype in my changeMarshall Clow2014-09-172-9/+6
| | | | llvm-svn: 217936
* Fix for mismatch to handle evil iterators which overload operator commaMarshall Clow2014-09-161-2/+2
| | | | llvm-svn: 217903
* Create a 'comma_iterator' class that overloads operator, and asserts when ↵Marshall Clow2014-09-163-0/+121
| | | | | | it's called. Add tests to mismatch to make sure it can't be blindsided by such an evil iterator. More tests for other algorithms forthcoming. Thanks to STL for pointing this out at CppCon and Yakov Galka for opening LWG issue #2133 llvm-svn: 217902
* Fix a bug in the move-assigment operator for basic_stringbuf. Thanks to ↵Marshall Clow2014-09-162-0/+41
| | | | | | Johnathan Wakeley for the bug report llvm-svn: 217894
* Thanks to K-ballo for noting a second incorrect noexcept clause in tuple - ↵Marshall Clow2014-09-161-3/+3
| | | | | | and suggesting a more correct way to write the first llvm-svn: 217884
* Fix a bad noexcept clause in tuple's move constructorMarshall Clow2014-09-161-2/+2
| | | | llvm-svn: 217878
* Forgot 'const' on my last checkinMarshall Clow2014-09-162-8/+8
| | | | llvm-svn: 217877
* Some of the synopsis was left out of these headers, and the copy ↵Marshall Clow2014-09-162-1/+32
| | | | | | construction/assignment should have been marked as deleted. Done. No functionality change, because the base class (base_ios) was marked as non-copyable already. llvm-svn: 217876
* PR20546: Fix tests for compare_exchange_weak.Dan Albert2014-09-066-18/+79
| | | | | | | | | | | | | | | | | | | | | | | | These calls are allowed to fail spuriously. 29.6.5.25: Remark: A weak compare-and-exchange operation may fail spuriously. That is, even when the contents of memory referred to by expected and object are equal, it may return false and store back to expected the same memory contents that were originally there. [ Note: This spurious failure enables implementation of compare and-exchange on a broader class of machines, e.g., load-locked store-conditional machines. A consequence of spurious failure is that nearly all uses of weak compare-and-exchange will be in a loop. To fix this, we replace any assert() that expects std::atomic::compare_exchange_weak() to return true with a loop. If the call does not return true within N runs (with N currently equal to 10), then the test fails. http://llvm.org/bugs/show_bug.cgi?id=20546 llvm-svn: 217319
* Address some post-commit review comments on r217261Jonathan Roelofs2014-09-054-5/+5
| | | | llvm-svn: 217276
* Allow libc++ to be built on systems without POSIX threadsJonathan Roelofs2014-09-05268-8/+687
| | | | | | | | | | If you're crazy enough to want this sort of thing, then add -D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and --param=additiona_features=libcpp-has-no-threads to your lit commnad line. http://reviews.llvm.org/D3969 llvm-svn: 217271
* Bugfix: allow additional_features to be emptyJonathan Roelofs2014-09-051-3/+4
| | | | llvm-svn: 217268
* Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on ↵Jonathan Roelofs2014-09-053-2/+12
| | | | | | | | available_features http://reviews.llvm.org/D5214 llvm-svn: 217261
* Define ELAST in libcxx's config header on FreeBSDViktor Kutuzov2014-09-041-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D5165 llvm-svn: 217146
* Make the ASAN RAII object a nop when building w/o ASANMarshall Clow2014-09-031-0/+8
| | | | llvm-svn: 217082
* Detection for _LIBCPP_HAS_NO_MONOTONIC_CLOCK caused several more build breakagesJonathan Roelofs2014-09-031-6/+0
| | | | | | Remove it for now. This flag can be set in build scripts instead. llvm-svn: 217061
* Allow libc++ to be built with GCC 5.0 compilerAlexey Volkov2014-09-031-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5169 llvm-svn: 217038
* test: Make it possible to opt in to use_clang_verify per testJustin Bogner2014-09-032-3/+8
| | | | | | | | | | | This modifies the use_clang_verify parameter I added in r217009 to only apply to tests that specifically ask for it via // USE_VERIFY. This allows us to incrementally convert tests, but start enjoying the benefits right away. Suggested by Eric Fiselier in code review. llvm-svn: 217017
* Fix buffer overflow issue in valarray testEric Fiselier2014-09-031-3/+2
| | | | llvm-svn: 217012
* test: Allow using clang -verify for failures rather than exit 1Justin Bogner2014-09-032-16/+38
| | | | | | | | | | | | | | | | | Currently, failure tests work by checking that compilation exits 1. This can lead to tests that fail for the wrong reason, so it'd be preferable to convert them to check for specific errors. This adds use_clang_verify parameter that runs failure tests using clang's -verify flag. I'll convert some tests in subsequent commits, and once all of the tests are converted we should key this on whether cxx_under_test is clang. I've also converted one of the unique.ptr tests, since it's the one that motivated the idea of using clang -verify when possible in the review of r216317. llvm-svn: 217009
* Fix yet another aspect of the build breakage caused by r216949Jonathan Roelofs2014-09-031-0/+4
| | | | llvm-svn: 217001
* Fix comment that was obsoleted by r216949Jonathan Roelofs2014-09-021-4/+2
| | | | llvm-svn: 216999
* Fix build breakage introduced in r216949Jonathan Roelofs2014-09-021-2/+2
| | | | | | | | The bug shows up on systems that `#define _POSIX_CLOCK_MONOTONIC 0` to indicate that users of CLOCK_MONOTONIC must check sysconf at runtime. See: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html llvm-svn: 216997
* [asan] Make vector asan annotations exception-friendlyKostya Serebryany2014-09-023-33/+243
| | | | | | | | | Fix vector asan annotations with RAII. Add a test. Also, remove one dead function. Review: http://reviews.llvm.org/D4170 llvm-svn: 216995
* Silence _LIBCPP_ELAST porting warning on __APPLE__Jonathan Roelofs2014-09-021-0/+2
| | | | | | This fixes a warning accidentally introduced in r216943. llvm-svn: 216977
* Don't #define _LIBCPP_HAS_NO_MONOTONIC_CLOCK on __APPLE__Jonathan Roelofs2014-09-021-2/+3
| | | | | | This fixes PR20839, which was a bug in r216949. llvm-svn: 216975
* Partially address a FIXME in steady_clock::now()Jonathan Roelofs2014-09-025-0/+15
| | | | | | http://reviews.llvm.org/D4045 llvm-svn: 216949
* Newlib names ELAST differently than linuxJonathan Roelofs2014-09-023-23/+25
| | | | llvm-svn: 216943
* Fix PR#20834 - 'is_trivially_destructible yeilds wrong answer for arrays of ↵Marshall Clow2014-09-0214-22/+21
| | | | | | unknown bound' Thanks to K-ballo for the bug report. Update a few of the other tests while we're here, and fix a typo in a test name. llvm-svn: 216909
* Mark test types for <atomic> nothrow default constructible. Patch from Steve ↵Eric Fiselier2014-08-2715-15/+15
| | | | | | | | | | | | | MacKenzie. The way the standard currently specifies the default constructor for atomic<T> requires T to be nothrow default constructible. This patch makes our test types meet this requirement. Note: The nothrow default constructible requirment is subject to the outcome of LWG issue 1265. llvm-svn: 216561
* Rename arguments in include/cmath to work around Newlib macro implementation ↵Jonathan Roelofs2014-08-271-230/+230
| | | | | | | | using these particular names http://reviews.llvm.org/D5080 llvm-svn: 216548
* Revert r216497: "[libcxx] Fix ctype_byname<wchar_t>::do_is() mask checking."Jonathan Roelofs2014-08-271-30/+30
| | | | | | | | | | | | | | | | After discussing implementing more tests for this with @danalbert & @mclow, I realized this change is not correct. The C++ standard requires do_is() to behave as if it were a loop that checked is(). Furthermore, it requires is() to check "The first form returns the result of the expression (M & m) != 0; i.e., true if the character has the characteristics specified"... which the reverted patch definitely does not conform to. Even further, furthermore, this requires that ctype's mask be an actual bitmask, unlike what android and newlib provide for _ctype_. Fixing the original bug that instigated this patch remains TBD. llvm-svn: 216508
* [libcxx] Fix ctype_byname<wchar_t>::do_is() mask checking.Jonathan Roelofs2014-08-261-30/+30
| | | | | | | This patch: http://reviews.llvm.org/D5081 Original patch: http://reviews.llvm.org/D5071 (from @danalbert) llvm-svn: 216497
* Replace 'noexcept' with '_NOEXCEPT' in <shared_mutex>. This allows us to ↵Marshall Clow2014-08-251-10/+10
| | | | | | build the dylib with MSVC, which doesn't support noexcept (sheesh\!). Thanks to K-ballo for the report. llvm-svn: 216384
OpenPOWER on IntegriCloud