Howard Hinnant
c1ca2e1e8b
Remove some erroneous code I was using to debug debug mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:46:07 +00:00
Howard Hinnant
295891fdc2
Debug mode tests for vector::front and back.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:31:25 +00:00
Howard Hinnant
0d01eb54e7
More vector::iterator debug mode tests. Run by adding to OPTIONS -D_LIBCPP_DEBUG2=1.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177897 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:03:19 +00:00
Howard Hinnant
f5f4684e71
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 19:29:35 +00:00
Howard Hinnant
ae7bf9daac
Marshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23 19:29:45 +00:00
Howard Hinnant
9976b5511a
This is a start at making the libc++ test suite friendlier to the -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23 17:27:16 +00:00
Howard Hinnant
06d8bf6ce2
Test cleanup with respect to use of deprecated tmpnam function. Also Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177755 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 20:05:40 +00:00
Marshall Clow
9b145da078
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:14:40 +00:00
Marshall Clow
04bd79b23a
Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator./a.out Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177693 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:13:55 +00:00
Marshall Clow
bdea27ba8f
Fix bug in test; found by AddressSanitizer
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20 00:01:48 +00:00
Howard Hinnant
b74309e3ad
Marshall Clow found this memory problem in strstream using -fsanitize=address on the test suite.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 22:16:57 +00:00
Howard Hinnant
903439f735
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 21:34:48 +00:00
Marshall Clow
c19fe86743
Fix bug in test; found by AddressSanitizer
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 23:39:36 +00:00
Marshall Clow
53e2763966
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 19:34:07 +00:00
Marshall Clow
dab9b2eb32
Removed raw references to _MSC_VER; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177304 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 18:20:48 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1
Removed raw references to _WIN32; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
e33c2d1926
This should be nothing but a load-time optimization. I'm trying to reduce load time initializers and this is a big one. No visible functionality change intended.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177212 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-16 00:17:53 +00:00
Marshall Clow
e47bc9bc4f
Updated link to Marshall's instructions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177099 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 19:00:34 +00:00
Howard Hinnant
c7cbe502db
Some forward-looking and optimistic documentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 18:37:48 +00:00
Howard Hinnant
c789025a5a
This SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin. Added. I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin. The current testsuite setup does not have a way a good way to test std::cin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176822 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 19:53:48 +00:00
Howard Hinnant
6319f1462d
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 19:06:24 +00:00
Howard Hinnant
23fb972520
Albert Wong: definition for regex_traits<_CharT>::__regex_word.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 19:38:08 +00:00
Howard Hinnant
707f318787
Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available. This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176639 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 19:25:03 +00:00
Howard Hinnant
83eade6abb
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 23:30:19 +00:00
Howard Hinnant
cc7bdae931
Have basic_istream::read call sgetn intead of sbumpc individual characters. This addresses http://llvm.org/bugs/show_bug.cgi?id=15427 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 19:27:56 +00:00
Howard Hinnant
3101474720
Correct silly type-o. Thanks Richard.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176568 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 18:16:12 +00:00
Howard Hinnant
11a31d0583
The bitset(unsigned long long) constructor was broken by the constexpr additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 17:30:26 +00:00
Howard Hinnant
fae54b9c14
Michael van der Westhuizen: correction to the libcxx build instructions when built with libcxxrt on Linux.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26 16:27:55 +00:00
Howard Hinnant
4a0e74fff8
Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-25 15:50:36 +00:00
Howard Hinnant
0560f786fe
Constrain bind operator()() to not exist if the call is not valid. Fixes http://llvm.org/bugs/show_bug.cgi?id=15295 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 18:16:55 +00:00
David Chisnall
76aa2ef017
Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.
...
This change removes the spurious m.unlock() call.
If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 11:28:45 +00:00
Howard Hinnant
0dee9cd5ad
Bruce Mitchener: Minor typo fixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175274 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 15:37:50 +00:00
Daniel Dunbar
3bc6a98c3e
[tests] Add support for a link_flags lit parameter.
...
- This is useful for testing with custom ABI libraries.
- Patch by Michael van der Westhuizen.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 19:28:51 +00:00
Daniel Dunbar
6b875ef374
[tests] Another batch of timeout increases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 21:04:34 +00:00
Howard Hinnant
af4d161908
Michael van der Westhuizen: Update instructions for building on Linux.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174733 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 19:10:36 +00:00
Howard Hinnant
af69f47e86
Add Michael van der Westhuizen to CREDITS.TXT
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 19:08:06 +00:00
Howard Hinnant
b85dea35b0
Michael van der Westhuizen: update to CMake.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174731 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 19:04:53 +00:00
Daniel Dunbar
8eba41324c
[tests] Another batch of timeout increases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:26:55 +00:00
Daniel Dunbar
1608b64881
[tests] Add back stdc macros I accidentally refactored out.
...
- Patch by Michael van der Westhuizen:
--
r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic. This small patch re-adds the macros.
Making this change fixes the following tests on Linux:
- depr/depr.c.headers/inttypes_h.pass.cpp
- depr/depr.c.headers/stdint_h.pass.cpp
- input.output/file.streams/c.files/cinttypes.pass.cpp
- language.support/cstdint/cstdint.syn/cstdint.pass.cpp
--
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:41:28 +00:00
Daniel Dunbar
fe14b970ac
[tests] Increase a bunch of wait limits.
...
- Basically I just ran the thread tests many many times on a busy machine and
bumped the timeouts whenever I hit a test failure.
- This is obviously subpar, but is the best I can do without the tests being
rewritten to not depend on arbitrary timeouts.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174721 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:41:19 +00:00
Marshall Clow
5920cfc403
Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 22:12:02 +00:00
Marshall Clow
b18165e704
Belt and suspenders when calling sysconf
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174642 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 18:48:09 +00:00
Marshall Clow
d854ce6bfa
Another libc++ warning suppression on Linux; no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174637 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 17:37:58 +00:00
Marshall Clow
9ae96d0f21
More libc++ warning suppression on Linux; no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 17:20:56 +00:00
Howard Hinnant
635bbbb6d1
Revert accidental check-in. These changes are probably good, but premature at this point.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174625 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:31:44 +00:00
Howard Hinnant
46c49d19aa
Michael van der Westhuizen: The attached patch add support for building against libc++abi and libcxxrt to CMake builds of libc++.
...
Usage (with the appropriate CC and CXX environment variables) is:
$ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx
and:
$ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:27:39 +00:00
Marshall Clow
88c3190d6c
Clean up some warnings for Linux build; No functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174611 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 14:22:51 +00:00
Daniel Dunbar
6afc7ad3eb
[build/Darwin] Use the correct libc++abi reexport list.
...
- This updates the build script to match the change originally in r149634, so
that we re-export symbols from libc++abi appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174563 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 00:24:19 +00:00
Daniel Dunbar
fd329a445e
[build] Detabify.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174562 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 00:24:17 +00:00