Commit Graph

1000 Commits

Author SHA1 Message Date
Howard Hinnant
54e2fff2e1 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 17:26:08 +00:00
Howard Hinnant
e0f0bfb5e6 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++.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173165 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 14:48:10 +00:00
Howard Hinnant
7173a501bb Saleem Abdulrasool: Ensure that __GLIBCXX__ is defined when building with libsupc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 14:44:06 +00:00
Howard Hinnant
7b9d6a8d40 Implement the ATOMIC_*_LOCK_FREE macros.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21 20:39:41 +00:00
Howard Hinnant
78f0de22db Donated anonymously: This enables GCC 4.8.0 to build libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21 17:26:55 +00:00
Howard Hinnant
5ce391e336 Make a few tests optimization-proof. These tests were failing under -O3 because the optimizer was eliminating the call to new.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172631 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:56:06 +00:00
Howard Hinnant
0b93963db7 Optimize basic_ostream::write by having it call sputn instead of sputc.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-15 17:22:03 +00:00
Howard Hinnant
b05a55675f Make <cmath> classification macros work with integral types.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:56:22 +00:00
Howard Hinnant
1b031c947f Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:01:24 +00:00
Howard Hinnant
3e3ae9ec41 Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 18:59:43 +00:00
Howard Hinnant
b4ebb0e415 Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172436 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:12:54 +00:00
Howard Hinnant
750039f50c Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:07:27 +00:00
Howard Hinnant
f619e230cc Fix exception safety bug in vector::push_back
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:36:59 +00:00
Marshall Clow
304c31b355 Made test output iterators have value_type of 'void'; matches ones in library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 17:20:02 +00:00
Marshall Clow
83e2c4d877 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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171594 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 03:21:01 +00:00
Howard Hinnant
6ae47055f9 atomic_bool was missing (just a typedef to atomic<bool>).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:58:50 +00:00
Marshall Clow
8226d0b7c5 ...and then there was one. Only one copy of 'iterators.h' in the test tree for libc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:24:04 +00:00
Marshall Clow
239e341c94 Removed another copy of 'iterators.h' files in libcxx/test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 03:57:56 +00:00
Marshall Clow
ba1920fe4b Removed several more different 'iterators.h' files in libcxx/test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 02:29:29 +00:00
Marshall Clow
002a984948 Removed 7 (of 8) different 'iterators.h' files in test/localization
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 01:45:09 +00:00
Howard Hinnant
159b9ba4ce Updating CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-01 16:09:11 +00:00
NAKAMURA Takumi
0e0bc1cfe8 Update the copyright coredits -- Happy new year 2013!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171342 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-01 10:00:19 +00:00
Howard Hinnant
352bd3a273 Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 20:09:48 +00:00
Michael J. Spencer
db8a030bd3 [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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171316 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 19:34:21 +00:00
Chandler Carruth
ed9f69d342 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 06:09:54 +00:00
Chandler Carruth
bbda4db0d5 Add a simple .arcconfig to make using the 'arc' commandline tool and the
phabricator code review site easier with libc++.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171275 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 05:59:45 +00:00
Howard Hinnant
d1a7479763 Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171232 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29 17:45:42 +00:00
Howard Hinnant
21772ec063 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171202 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-28 18:15:01 +00:00
Howard Hinnant
2328902ab1 Saleem Abdulrasool: Add entry to CREDITS.TXT.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 23:26:52 +00:00
Howard Hinnant
5f767b7b28 Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171173 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 23:24:31 +00:00
Howard Hinnant
bf68bdc4ed Saleem Abdulrasool: avoid hardcoding buffer lengths.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171169 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 21:17:53 +00:00
Howard Hinnant
0aa900e94f Saleem Abdulrasool: Silence warning and reduce unnecessary code in hash.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 18:59:05 +00:00
Howard Hinnant
c6e54b964f Saleem Abdulrasool: This just rounds up a few compile warnings emitted by GCC (4.7.2).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171165 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 18:46:00 +00:00
Chad Rosier
27c836ff3a Remove redundant inits. Patch by Eitan Adler.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170967 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-22 00:12:05 +00:00
Howard Hinnant
3793a7d202 Test case for http://llvm.org/bugs/show_bug.cgi?id=14670.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170706 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 16:50:07 +00:00
Howard Hinnant
ee717d8c44 Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170703 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 15:40:28 +00:00
Richard Smith
b2f2b68143 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170662 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 04:20:28 +00:00
Marshall Clow
a46482e8bb Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170435 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 16:46:30 +00:00
Howard Hinnant
3d4f92c08a Updated CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170062 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13 00:51:59 +00:00
Howard Hinnant
0a69fa14d2 Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12 21:14:28 +00:00
Howard Hinnant
7fa77a701f Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@169686 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-09 00:12:14 +00:00
Michael J. Spencer
a358fbe504 [CMake] Add support for selecting which c++ abi library to use.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@169036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-30 21:02:29 +00:00
Richard Smith
53008d8b0c 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168853 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 04:30:50 +00:00
Daniel Dunbar
af01e708aa tests/lit: Change test default parameters to assume local build.
- Also, support overriding them with lit parameters.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168749 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 23:56:28 +00:00
Howard Hinnant
b0895ff8ae Fix type-o.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168715 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 18:52:32 +00:00
Howard Hinnant
641f6c1f65 Remove by-chapter breakdown of what is implemented. The chart is now obsolete.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168713 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 18:35:09 +00:00
Howard Hinnant
8a9c5ea750 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168610 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-26 21:18:17 +00:00
Howard Hinnant
984f10fdc0 istreambuf_iterator increment should call sbumpc instead of snextc. Patch
by Kimball Thurston.  This fixes http://llvm.org/bugs/show_bug.cgi?id=14358.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168209 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 22:17:23 +00:00
Howard Hinnant
537b2fa6b8 Restrict optimized __pad_and_output implementation detail to desired releases.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167980 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 21:17:15 +00:00
Marshall Clow
faa17162e9 Change C++0x references to C++11, Fixes bug #12745
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167930 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 16:31:15 +00:00