summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* add tests for ENAMETOOLONGEric Fiselier2017-02-172-9/+25
| | | | llvm-svn: 295390
* Update a couple of issue statusesMarshall Clow2017-02-161-3/+3
| | | | llvm-svn: 295355
* math: correct the MSVCRT conditionSaleem Abdulrasool2017-02-162-4/+4
| | | | | | Fixes a number of tests in the testsuite on Windows. llvm-svn: 295330
* threading_support: make __thread_sleep_for be alertableSaleem Abdulrasool2017-02-161-2/+5
| | | | | | | | | | On Windows, we were using `Sleep` which is not alertable. This means that if the thread was used for a user APC or WinProc handling and thread::sleep was used, we could potentially dead lock. Use `SleepEx` with an alertable sleep, resuming until the time has expired if we are awoken early. llvm-svn: 295329
* Add tests for noexcept functionsEric Fiselier2017-02-133-93/+190
| | | | llvm-svn: 294995
* config: disable thread safety analysis on COFFSaleem Abdulrasool2017-02-131-2/+8
| | | | | | | | clang cannot properly handle __declspec and __attribute__ on classes right now. This prevents the shared_mutex tests from working. Disable the use of the annotation on COFF targets. llvm-svn: 294958
* math: actually pull the declarations/overloads into stdSaleem Abdulrasool2017-02-132-1/+4
| | | | | | | The previous changes missed the change to include/cmath. These changes allow some of the rand.distribution tests to pass on Windows. llvm-svn: 294957
* test: mark another test as requiring pthreadsSaleem Abdulrasool2017-02-131-0/+1
| | | | | | | This is checking pthread specific behaviour. Add a requirement on pthreads. llvm-svn: 294956
* math: follow up to SVN r294902Saleem Abdulrasool2017-02-121-26/+26
| | | | | | | | Pull in the math functions from ucrt 14+ after auditing the library. It seems that they are now complete for C99 math. Fixes more windows tests! llvm-svn: 294918
* test: use char32_t rather than wchar_tSaleem Abdulrasool2017-02-122-29/+29
| | | | | | | | | wchar_t is not as portable as char32_t. On Windows, wchar_t is 16-bytes and on Linux 32-bits. The conversion to utf8 causes the characters to exceed the limits on char16_t, resulting in tautological comparisons. llvm-svn: 294917
* test: mark requirement for pthread testSaleem Abdulrasool2017-02-121-0/+1
| | | | | | | | This test explicitly is checking the behaviour of std::thread and pthread interactions. This requires pthreads. Add an appropriate requirement. llvm-svn: 294903
* math: pull more C functions from stdSaleem Abdulrasool2017-02-121-2/+2
| | | | | | | The newer ucrt version provides the gamma meth routines. Includede them when building the library. llvm-svn: 294902
* test: squelch -Wreturn-type errorSaleem Abdulrasool2017-02-121-1/+8
| | | | | | | Add an unreachable marker to avoid a -Wreturn-type error when building on Windows. llvm-svn: 294901
* cmath: adjust math forwards for WindowsSaleem Abdulrasool2017-02-121-2/+2
| | | | | | | | The newer versions of ucrt have the math routines. Use the CRT version to determine if we should include the math routines. Fixes two tests for Windows. llvm-svn: 294899
* Remove a now unneeded __CloudABI__ check.Ed Schouten2017-02-111-2/+0
| | | | | | | CloudABI has gained the setlocale() function in the meantime, meaning there is no longer a need to conditionalize this. llvm-svn: 294833
* Fix the build of thread.cpp on CloudABI.Ed Schouten2017-02-111-2/+2
| | | | | | | CloudABI does provide unistd.h, but doesn't define __unix__. We need to include this header file to make hardware_concurrency work. llvm-svn: 294832
* Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.Marshall Clow2017-02-102-3/+3
| | | | llvm-svn: 294798
* Make lcm/gcd work better in edge cases. Fixes a UBSAN failure.Marshall Clow2017-02-106-28/+52
| | | | llvm-svn: 294779
* Fix yet another Apple buildit bugEric Fiselier2017-02-101-1/+3
| | | | llvm-svn: 294732
* Attempt to fix Apple buildit botsEric Fiselier2017-02-101-1/+5
| | | | llvm-svn: 294731
* Recommit "Split exception.cpp and new.cpp implementation into different ↵Eric Fiselier2017-02-1017-509/+726
| | | | | | | | | | | | | | | | | | | | | | files for different runtimes." This recommits r294707 with additional fixes. The main difference is libc++ now correctly builds without any ABI library. exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. llvm-svn: 294730
* Revert "Split exception.cpp and new.cpp implementation into different files ↵Eric Fiselier2017-02-1017-724/+508
| | | | | | | | for different runtimes." The compiler-rt CMake configuration needs some tweaking before this can land. llvm-svn: 294727
* Properly escape ShellTest subsitutions on Windows. Try 2Eric Fiselier2017-02-101-5/+6
| | | | llvm-svn: 294721
* test: XFAIL windows for non-portable testSaleem Abdulrasool2017-02-101-0/+1
| | | | | | | | This test validates that the lock_guard is declared variadically across C++03 and C++11. Given the lack of stable ABI on Windows and the fact that the RTTI encoding on Windows is different, XFAIL it on that target. llvm-svn: 294720
* test: fix test under WindowsSaleem Abdulrasool2017-02-101-1/+1
| | | | | | | When running the test under clang-cl, we do not report `__GNUC__`, which is needed to supress the warnings which are being treated as errors. llvm-svn: 294719
* properly escape compiler path in .sh.cpp testsEric Fiselier2017-02-101-1/+1
| | | | llvm-svn: 294718
* test: allow -target usage on WindowsSaleem Abdulrasool2017-02-101-2/+6
| | | | | | | | When running the tests on Windows with a debug build, _DEBUG must be added to the flags prior to the -target as the forced inclusion of a header will prevent the compile test for the flag to fail. llvm-svn: 294716
* Correctly default to using the system libc++abi on Apple.Eric Fiselier2017-02-102-11/+8
| | | | | | | This patch fixes a regression where libc++ didn't correctly select the system libc++abi when no in-tree version was found. llvm-svn: 294712
* Split exception.cpp and new.cpp implementation into different files for ↵Eric Fiselier2017-02-1016-505/+724
| | | | | | | | | | | | | | | | | | | different runtimes. exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. llvm-svn: 294707
* docs: add some documentation for building on WindowsSaleem Abdulrasool2017-02-101-0/+51
| | | | | | | | | This covers how to build libc++ for Windows. This allows others to replicate the MS ABI style build for libc++. It only depends on msvcrt as it uses the Windows threading model and the Windows ABI and can serve as an ABI compatible replacement for msvcprt. llvm-svn: 294705
* Attempt to fix finding clang++ on WindowsEric Fiselier2017-02-101-2/+4
| | | | llvm-svn: 294699
* __threading_support: fix windows buildSaleem Abdulrasool2017-02-101-1/+2
| | | | | | | | The build was broken as there was no overload for long and std::chrono::nanoseconds. Add an explicit conversion to use the operator+. llvm-svn: 294698
* Fully qualify (preprend ::) calls to math functions from libcMehdi Amini2017-02-101-170/+170
| | | | | | | | | | | | | | | | | | | | | | Summary: This can cause a compile failure in cases like: double log(double); namespace foo { namespace log {} } using namespace foo; void bar(int i) { log((double)i); } Reviewers: EricWF, mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29804 llvm-svn: 294696
* Check for musl-libc's max_align_t in addition to other variants.David L. Jones2017-02-102-2/+4
| | | | | | | | | | | | | | | | | | Summary: Libcxx will define its own max_align_t when it is not available. However, the availability checks today only check for Clang's definition and GCC's definition. In particular, it does not check for musl's definition, which is the same as GCC's but guarded with a different macro. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: chandlerc, cfe-commits Differential Revision: https://reviews.llvm.org/D28478 llvm-svn: 294683
* Add missing libc++ importEric Fiselier2017-02-101-0/+1
| | | | llvm-svn: 294673
* add missing python importEric Fiselier2017-02-091-1/+2
| | | | llvm-svn: 294660
* Move libcxx/test/libcxx python package into libcxx/utils/libcxx.Eric Fiselier2017-02-0913-142/+310
| | | | | | | This patch merges the test python package with the newly created package in utils. llvm-svn: 294651
* Start libc++ python cleanup and consolidation.Eric Fiselier2017-02-0916-10/+27
| | | | | | | | | Libc++ frequently creates and uses utilities written in python. Currently there are python modules under both libcxx/test and libcxx/util. My goal with these changes is to consolidate them into a single package under libcxx/utils/libcxx. llvm-svn: 294644
* Fix PR31916 - std::visit rejects visitors accepting lvalue argumentsEric Fiselier2017-02-092-1/+12
| | | | | | | | | | A static assertion was misfiring since it checked is_callable<Visitor, decltype(__variant_alt<T>.value)>. However the decltype expression doesn't capture the value category as required. This patch applies extra braces to decltype to fix that. llvm-svn: 294612
* Use protected name for the prototype arguments.Joerg Sonnenberger2017-02-092-2/+2
| | | | llvm-svn: 294585
* Threading support: externalize sleep_for() function.Asiri Rathnayake2017-02-092-28/+37
| | | | | | | | | | Different platforms implement the wait/sleep functions in difrerent ways. It makes sense to externalize this into the threading API. Differential revision: https://reviews.llvm.org/D29630 Reviewers: EricWF, joerg llvm-svn: 294573
* [libcxx][CMake] Support in-tree libunwind when building as part of runtimesPetr Hosek2017-02-092-2/+3
| | | | | | | | | | | When building as part of runtimes, there is no predefined order in which the runtimes are loaded, so the targets from other projects might not be available. We need to rely on HAVE_<name> variables instead in that case. Differential Revision: https://reviews.llvm.org/D29575 llvm-svn: 294553
* Update info for LWG 2665 in upcoming_meeting.htmlEric Fiselier2017-02-081-3/+3
| | | | llvm-svn: 294501
* [test] Fix hard_link_count test to account for fs with dir nlink==1Michal Gorny2017-02-081-4/+8
| | | | | | | | | | Filesystems are not required to maintain a hard link count consistent with number of subdirectories. For example, on btrfs all directories have nlink==1. Account for that in the test. Differential Revision: https://reviews.llvm.org/D29706 llvm-svn: 294431
* Temporarily disable the LCM/GCD tests under UBSAN.Marshall Clow2017-02-082-0/+3
| | | | llvm-svn: 294417
* Add missing include in <numeric>Eric Fiselier2017-02-081-0/+1
| | | | llvm-svn: 294393
* Prevent UBSAN from generating unsigned overflow diagnostics in the hashing ↵Eric Fiselier2017-02-083-10/+76
| | | | | | internals llvm-svn: 294391
* Fix bugs in filesystem detected by _LIBCPP_ASSERT.Eric Fiselier2017-02-072-7/+16
| | | | | | | | | | | | | | | | | Recently I turned on libc++'s debug mode assertions when CMake is configured with -DLIBCXX_ENABLE_ASSERTIONS=ON. This change exposed assertion failures caused by bugs in filesystem. This patch fixes those failures. The first bug was that `PathParser` was using front()/back() on empty string views in order to get the address of the character. However this is UB on empty strings. Those operations now use data() to obtain the pointer. The second bug was that directory_iterator attempted to capture errno when it was unset and there was an assertion to detect this. llvm-svn: 294360
* fix python3 syntax errorEric Fiselier2017-02-071-1/+1
| | | | llvm-svn: 294355
* Fix test failures when using modules.Eric Fiselier2017-02-078-0/+19
| | | | llvm-svn: 294353
OpenPOWER on IntegriCloud