Commit Graph

919 Commits

Author SHA1 Message Date
Marshall Clow 0749262a11 Belt and suspenders when calling sysconf
llvm-svn: 174642
2013-02-07 18:48:09 +00:00
Marshall Clow 63f700e4d1 Another libc++ warning suppression on Linux; no functionality change
llvm-svn: 174637
2013-02-07 17:37:58 +00:00
Marshall Clow d58e0f5505 More libc++ warning suppression on Linux; no functionality change
llvm-svn: 174636
2013-02-07 17:20:56 +00:00
Howard Hinnant aba500d633 Revert accidental check-in. These changes are probably good, but premature at this point.
llvm-svn: 174625
2013-02-07 15:31:44 +00:00
Howard Hinnant 804f9116e5 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

llvm-svn: 174623
2013-02-07 15:27:39 +00:00
Marshall Clow eb159ee704 Clean up some warnings for Linux build; No functionality change
llvm-svn: 174611
2013-02-07 14:22:51 +00:00
Daniel Dunbar bdd4ec71db [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.

llvm-svn: 174563
2013-02-07 00:24:19 +00:00
Daniel Dunbar 6bd3374de2 [build] Detabify.
llvm-svn: 174562
2013-02-07 00:24:17 +00:00
Howard Hinnant d3d4356f6e Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
llvm-svn: 174544
2013-02-06 21:03:39 +00:00
Howard Hinnant 584a65befd Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often.
llvm-svn: 174539
2013-02-06 20:25:56 +00:00
Daniel Dunbar 05abe9372b [tests] Infer the cxx_under_test (as clang++).
- This is a reasonable default, and makes testing just work with no required
   parameters.

 - Add notes on all of the inferred or default values.

llvm-svn: 174538
2013-02-06 20:24:23 +00:00
Daniel Dunbar 5178942ded [tests] Change test default to run against locally built library.
llvm-svn: 174528
2013-02-06 17:47:08 +00:00
Daniel Dunbar d2d614cd84 [tests] Enable use_system_lib support on Linux.
- Patch by Michael van der Westhuizen.

llvm-svn: 174527
2013-02-06 17:45:53 +00:00
Daniel Dunbar 434fb1f6d5 [tests] One last batch of XFAILs, for tests using new symbols added to libc++.
- As of this commit, the test suite should now fully pass on both darwin11 and
   darwin12 when testing against either a locally built libc++ or the system libc++.

llvm-svn: 174478
2013-02-06 00:59:06 +00:00
Daniel Dunbar 76ff8b54b3 [build] Create the link for the final library install name in the lib dir.
- Otherwise, we never were actually linking against the right library when
   building the test applications.

llvm-svn: 174470
2013-02-06 00:04:54 +00:00
Daniel Dunbar ba65d61767 [tests] Accept XFAIL arguments that match any part of a feature.
llvm-svn: 174469
2013-02-06 00:04:52 +00:00
Daniel Dunbar 36860df355 [tests] XFAIL some locale tests that don't seem to work on any Darwin.
llvm-svn: 174459
2013-02-05 22:51:20 +00:00
Daniel Dunbar b6354a0767 [tests] If no explicit target triple is given, try to infer it.
llvm-svn: 174454
2013-02-05 22:28:03 +00:00
Daniel Dunbar a563f32c6a [tests] Mark another stream input expected failure (with system libc++).
llvm-svn: 174453
2013-02-05 22:21:52 +00:00
Daniel Dunbar d0f05fb1b7 [tests] Mark another stream input expected failure (with system libc++).
llvm-svn: 174452
2013-02-05 22:10:28 +00:00
Daniel Dunbar 5ce9a5358b [tests] Mark some string.conversions expected failures (with system libc++).
llvm-svn: 174451
2013-02-05 22:10:27 +00:00
Daniel Dunbar 1a7f7bc6bf [tests] XFAIL a few things that require libc (?) support missing on Darwin.
llvm-svn: 174450
2013-02-05 22:10:25 +00:00
Daniel Dunbar d15f013dc2 [tests] Mark some istream.unformatted expected failures (with system libc++).
llvm-svn: 174444
2013-02-05 21:43:32 +00:00
Daniel Dunbar 582c97defa [tests] Add an available feature that combines the triple and use_system_lib.
- This is so that we can easily write XFAIL markers for tests that are known
    to fail with versions of libc++ as were shipped with a particular triple.

llvm-svn: 174443
2013-02-05 21:43:30 +00:00
Daniel Dunbar f51f0319bb [tests] Add support for REQUIRES and XFAIL lines in libc++ tests.
- We parse up to the first non-empty non-comment (C++ style) line, otherwise
   the format and semantics match what is used for LLVM/Clang tests.

 - For now, the only interesting thing to test against is a user supplied
   target_triple test parameter.

llvm-svn: 174440
2013-02-05 21:03:25 +00:00
Daniel Dunbar 8495871807 [tests] Add a 'use_system_lib' parameter.
- This controls whether to execute against the locally built library or
   not. The default is currently True which maps to what was already being done
   by default.

 - I'd appreciate it if someone can implement the proper handling of this flag
   on linux, I no longer remember the details of its .so handling.

llvm-svn: 174404
2013-02-05 18:03:49 +00:00
Howard Hinnant 2446649c1e Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
template typename deductions on swap<> (used in string.cpp).  Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value.  Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.

llvm-svn: 173172
2013-01-22 17:26:08 +00:00
Howard Hinnant f55c0db8b5 Saleem Abdulrasool: __terminate_handler and __unexpected_handler are defined but not used when
building against libsupc++ as the functions for which they are used are provided
by libsupc++.  Simply preprocess them away when building against libsupc++.

llvm-svn: 173165
2013-01-22 14:48:10 +00:00
Howard Hinnant 2ac1ae6150 Saleem Abdulrasool: Ensure that __GLIBCXX__ is defined when building with libsupc++.
llvm-svn: 173164
2013-01-22 14:44:06 +00:00
Howard Hinnant ead15d1f95 Implement the ATOMIC_*_LOCK_FREE macros.
llvm-svn: 173084
2013-01-21 20:39:41 +00:00
Howard Hinnant 8d3e797444 Donated anonymously: This enables GCC 4.8.0 to build libc++.
llvm-svn: 173060
2013-01-21 17:26:55 +00:00
Howard Hinnant d27745e4fb Make a few tests optimization-proof. These tests were failing under -O3 because the optimizer was eliminating the call to new.
llvm-svn: 172631
2013-01-16 17:56:06 +00:00
Howard Hinnant 3d7eb2f806 Optimize basic_ostream::write by having it call sputn instead of sputc.
llvm-svn: 172542
2013-01-15 17:22:03 +00:00
Howard Hinnant 980e7e7402 Make <cmath> classification macros work with integral types.
llvm-svn: 172461
2013-01-14 20:56:22 +00:00
Howard Hinnant 2153d69672 Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934.
llvm-svn: 172456
2013-01-14 20:01:24 +00:00
Howard Hinnant 1afbabab32 Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919.
llvm-svn: 172447
2013-01-14 18:59:43 +00:00
Howard Hinnant 3778f27b23 Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892.
llvm-svn: 172436
2013-01-14 17:12:54 +00:00
Howard Hinnant f1e633c154 Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648.
llvm-svn: 172435
2013-01-14 17:07:27 +00:00
Howard Hinnant 8d9aec8802 Fix exception safety bug in vector::push_back
llvm-svn: 172250
2013-01-11 20:36:59 +00:00
Marshall Clow 4476100a2f Made test output iterators have value_type of 'void'; matches ones in library
llvm-svn: 171980
2013-01-09 17:20:02 +00:00
Marshall Clow 322270842c Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files
llvm-svn: 171594
2013-01-05 03:21:01 +00:00
Howard Hinnant 114676622f atomic_bool was missing (just a typedef to atomic<bool>).
llvm-svn: 171498
2013-01-04 18:58:50 +00:00
Marshall Clow f8c2b82337 ...and then there was one. Only one copy of 'iterators.h' in the test tree for libc++
llvm-svn: 171479
2013-01-04 18:24:04 +00:00
Marshall Clow f941359201 Removed another copy of 'iterators.h' files in libcxx/test
llvm-svn: 171456
2013-01-03 03:57:56 +00:00
Marshall Clow cf1589f749 Removed several more different 'iterators.h' files in libcxx/test
llvm-svn: 171452
2013-01-03 02:29:29 +00:00
Marshall Clow 9b726d242f Removed 7 (of 8) different 'iterators.h' files in test/localization
llvm-svn: 171443
2013-01-03 01:45:09 +00:00
Howard Hinnant 5b5e5336a4 Updating CREDITS.TXT
llvm-svn: 171347
2013-01-01 16:09:11 +00:00
NAKAMURA Takumi 43632a26a5 Update the copyright coredits -- Happy new year 2013!
llvm-svn: 171342
2013-01-01 10:00:19 +00:00
Howard Hinnant 861f006d3f Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
llvm-svn: 171321
2012-12-31 20:09:48 +00:00
Michael J. Spencer bb8cfd0fec [CMake] Fix c++ abi library configuration on Linux.
You can now configure from the command line using:
-DLIBCXX_CXX_ABI=libsupc++
-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="path;path

Also documents how to build on Linux.

llvm-svn: 171316
2012-12-31 19:34:21 +00:00
Chandler Carruth e70a813b59 Don't mark variadic functions as always inline -- they cannot in fact be
inlined.

Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.

llvm-svn: 171276
2012-12-31 06:09:54 +00:00
Chandler Carruth 3036ab26e3 Add a simple .arcconfig to make using the 'arc' commandline tool and the
phabricator code review site easier with libc++.

llvm-svn: 171275
2012-12-31 05:59:45 +00:00
Howard Hinnant a96d74585f Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
llvm-svn: 171232
2012-12-29 17:45:42 +00:00
Howard Hinnant bd037ab4ba Saleem Abdulrasool: GCC complains about the template functions as potentially not being able to be
inlined.  These do not need to be always-inlined for ABI stability because they are not exported beyond this source due to the unnamed namespace.
Also simplified use of the Wmissing-field-initializers pragma as was done for clang.

llvm-svn: 171202
2012-12-28 18:15:01 +00:00
Howard Hinnant 0933f5d358 Saleem Abdulrasool: Add entry to CREDITS.TXT.
llvm-svn: 171174
2012-12-27 23:26:52 +00:00
Howard Hinnant 6b0101acae Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.
llvm-svn: 171173
2012-12-27 23:24:31 +00:00
Howard Hinnant 80a11413bb Saleem Abdulrasool: avoid hardcoding buffer lengths.
llvm-svn: 171169
2012-12-27 21:17:53 +00:00
Howard Hinnant 43d978e5c4 Saleem Abdulrasool: Silence warning and reduce unnecessary code in hash.cpp.
llvm-svn: 171167
2012-12-27 18:59:05 +00:00
Howard Hinnant 267e3e1eb8 Saleem Abdulrasool: This just rounds up a few compile warnings emitted by GCC (4.7.2).
llvm-svn: 171165
2012-12-27 18:46:00 +00:00
Chad Rosier 7f902715e8 Remove redundant inits. Patch by Eitan Adler.
llvm-svn: 170967
2012-12-22 00:12:05 +00:00
Howard Hinnant d15de653f0 Test case for http://llvm.org/bugs/show_bug.cgi?id=14670.
llvm-svn: 170706
2012-12-20 16:50:07 +00:00
Howard Hinnant 3b42bdd58a Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670.
llvm-svn: 170703
2012-12-20 15:40:28 +00:00
Richard Smith e3fbbccc0f Implement std::is_base_of for the case where we don't have a compiler
intrinsic. This relies upon the fact that overload resolution does not check
access and ambiguity for a derived-to-base conversion. This passes all
is_base_of tests in the test suite.

llvm-svn: 170662
2012-12-20 04:20:28 +00:00
Marshall Clow 36a60721ce Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
llvm-svn: 170435
2012-12-18 16:46:30 +00:00
Howard Hinnant 3cea78ee68 Updated CREDITS.TXT
llvm-svn: 170062
2012-12-13 00:51:59 +00:00
Howard Hinnant 16694b5df5 Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585.
llvm-svn: 170026
2012-12-12 21:14:28 +00:00
Howard Hinnant 9f4328b173 Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.
llvm-svn: 169686
2012-12-09 00:12:14 +00:00
Michael J. Spencer 299fc29a59 [CMake] Add support for selecting which c++ abi library to use.
llvm-svn: 169036
2012-11-30 21:02:29 +00:00
Richard Smith e1f363c724 Remove 'noreturn' attribute from friend declaration. This attribute will be
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.

llvm-svn: 168853
2012-11-29 04:30:50 +00:00
Daniel Dunbar 7c4b853e74 tests/lit: Change test default parameters to assume local build.
- Also, support overriding them with lit parameters.

llvm-svn: 168749
2012-11-27 23:56:28 +00:00
Howard Hinnant 6852b55314 Fix type-o.
llvm-svn: 168715
2012-11-27 18:52:32 +00:00
Howard Hinnant 43a1f7b045 Remove by-chapter breakdown of what is implemented. The chart is now obsolete.
llvm-svn: 168713
2012-11-27 18:35:09 +00:00
Howard Hinnant f8b24cf5f7 Dimitry Andric: When using libc++ headers on FreeBSD, in combination with -std=c++98,
-ansi or -std=c++03, the long long type is not supported.  So in this
case, several functions and types, like lldiv_t, strtoll(), are not
declared.

llvm-svn: 168610
2012-11-26 21:18:17 +00:00
Howard Hinnant dfdf5085df istreambuf_iterator increment should call sbumpc instead of snextc. Patch
by Kimball Thurston.  This fixes http://llvm.org/bugs/show_bug.cgi?id=14358.

llvm-svn: 168209
2012-11-16 22:17:23 +00:00
Howard Hinnant b5c63a2e07 Restrict optimized __pad_and_output implementation detail to desired releases.
llvm-svn: 167980
2012-11-14 21:17:15 +00:00
Marshall Clow 497d9d2671 Change C++0x references to C++11, Fixes bug #12745
llvm-svn: 167930
2012-11-14 16:31:15 +00:00
Howard Hinnant 119703f984 Dimitry Andric: Silence some miscellaneous warnings.
llvm-svn: 167493
2012-11-06 21:55:44 +00:00
Howard Hinnant 3e2740a36c Dimitry Andric: Silence some warnings in <locale>.
llvm-svn: 167492
2012-11-06 21:48:33 +00:00
Howard Hinnant a01739a03a Enable the tuple interface of pair in C++03 mode.
llvm-svn: 167491
2012-11-06 21:42:45 +00:00
Howard Hinnant 1c8358c13c Update instructions for building and using libc++ on Mac OS
llvm-svn: 167490
2012-11-06 21:31:37 +00:00
Howard Hinnant cd47cbc7a4 Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
llvm-svn: 167486
2012-11-06 21:08:48 +00:00
Howard Hinnant 66e7ed959f peek should set eofbit if sgetc() returns eof.
llvm-svn: 167238
2012-11-01 17:32:07 +00:00
Howard Hinnant b304811686 Richard Smith: This fixes a problem in std::is_constructible for incomplete types, and those types with a user-defined operator,().
llvm-svn: 167233
2012-11-01 16:32:14 +00:00
Howard Hinnant 54d333a601 Rename uses of _ and __ because these are getting stepped on by macros from other system code.
llvm-svn: 167038
2012-10-30 19:06:59 +00:00
Argyrios Kyrtzidis 523623c239 Add an entry in CREDITS.TXT
llvm-svn: 165949
2012-10-15 17:34:53 +00:00
Howard Hinnant 6758190507 Use traits_type::to_int_type in basic_streambuf<_CharT, _Traits>::xsputn when calling overflow to correctly handle negative signed character types. This fixes http://llvm.org/bugs/show_bug.cgi?id=14074.
llvm-svn: 165884
2012-10-13 19:31:51 +00:00
Howard Hinnant 7ba8160360 Dimitry Andric: FreeBSD only: Add the C11 aligned_alloc to <cstdlib> and adjust the inclusion of quick_exit.
llvm-svn: 165882
2012-10-13 18:03:53 +00:00
Argyrios Kyrtzidis 88db3171dd Don't neglect to "return *this".
llvm-svn: 165860
2012-10-13 02:03:45 +00:00
Howard Hinnant f543a75be1 Holger Arnold: Correct the use and testing of __GNUC__ and __GNUC_MINOR__ in <__config>.
llvm-svn: 165151
2012-10-03 20:48:05 +00:00
Howard Hinnant 6e551ae1a3 Make vector::iterator and string::iterator more resilient against overly generic relational operators.
llvm-svn: 165033
2012-10-02 19:45:42 +00:00
Howard Hinnant 59fb5c6559 Due to a mistake on my own part, I need to burn some version numbers. This does not impact any of the implementation of libc++, and does not impact the ABI in any way.
llvm-svn: 164832
2012-09-28 17:42:25 +00:00
Howard Hinnant 324c084654 Bump _LIBCPP_VERSION to 1002
llvm-svn: 164700
2012-09-26 15:38:09 +00:00
Howard Hinnant 8e747d3671 Apply the emulated nullptr_t with constexpr. This is an unusual configuration that would take advantage of this. But it has popped up in the wild and does no harm to support it.
llvm-svn: 164575
2012-09-24 23:36:40 +00:00
Marshall Clow b07ddfcac7 Updating email address
llvm-svn: 164489
2012-09-24 14:27:10 +00:00
Bob Wilson feeec326fe Fix installheaders target to do what it did prior to r161760. rdar://12348765
llvm-svn: 164413
2012-09-21 20:49:54 +00:00
Howard Hinnant c43826f003 Add overflow check to tanh(complex) and reduce to finite answer. Fixes http://llvm.org/bugs/show_bug.cgi?id=13874
llvm-svn: 164266
2012-09-19 23:51:47 +00:00
Howard Hinnant 92b5940fbb Overloaded __pad_and_output on ostreambuf_iterator and in this overload call sputn instead of dereferencing the iterator which calls sputc. This is intended to be purely a performance optimization, especially for clients who may have overloaded the virtual function xsputn.
llvm-svn: 164241
2012-09-19 19:14:15 +00:00
Howard Hinnant a0bc10dca6 Align <atomic> with clang r163964 which disallows const _Atomic types.
llvm-svn: 164004
2012-09-16 20:33:09 +00:00
Howard Hinnant 948b8cb51b Update CREDITS.TXT
llvm-svn: 163949
2012-09-14 23:28:54 +00:00
Howard Hinnant aeb85680fb Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send me a patch to CREDITS.TXT?
llvm-svn: 163862
2012-09-14 00:39:16 +00:00