92bd7c0337 
								
							 
						 
						
							
							
								
								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.  
							
							... 
							
							
							
							llvm-svn: 177892 
							
						 
						
							2013-03-25 19:29:35 +00:00  
				
					
						
							
							
								 
						
							
								c962cdf8a5 
								
							 
						 
						
							
							
								
								Fix buffer read overflow in money_get::do_get(). Found by UBSan  
							
							... 
							
							
							
							llvm-svn: 177694 
							
						 
						
							2013-03-22 02:14:40 +00:00  
				
					
						
							
							
								 
						
							
								1c2c986796 
								
							 
						 
						
							
							
								
								Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator./a.out  Found by UBSan  
							
							... 
							
							
							
							llvm-svn: 177693 
							
						 
						
							2013-03-22 02:13:55 +00:00  
				
					
						
							
							
								 
						
							
								591ebe3cbb 
								
							 
						 
						
							
							
								
								This is an optimization which produces improved launching time.  There should be no functionality change.  Clients should see no ABI differences.  
							
							... 
							
							
							
							llvm-svn: 177443 
							
						 
						
							2013-03-19 21:34:48 +00:00  
				
					
						
							
							
								 
						
							
								69e76f80e2 
								
							 
						 
						
							
							
								
								Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.  
							
							... 
							
							
							
							llvm-svn: 177310 
							
						 
						
							2013-03-18 19:34:07 +00:00  
				
					
						
							
							
								 
						
							
								7415c8b171 
								
							 
						 
						
							
							
								
								Removed raw references to _MSC_VER; now just check to see if it is defined.  
							
							... 
							
							
							
							llvm-svn: 177304 
							
						 
						
							2013-03-18 18:20:48 +00:00  
				
					
						
							
							
								 
						
							
								b56e8587af 
								
							 
						 
						
							
							
								
								Removed raw references to __APPLE__; now just check to see if it is defined.  
							
							... 
							
							
							
							llvm-svn: 177297 
							
						 
						
							2013-03-18 17:45:34 +00:00  
				
					
						
							
							
								 
						
							
								91907cbe82 
								
							 
						 
						
							
							
								
								Removed raw references to _WIN32; now just check to see if it is defined.  
							
							... 
							
							
							
							llvm-svn: 177291 
							
						 
						
							2013-03-18 17:04:29 +00:00  
				
					
						
							
							
								 
						
							
								41801f14ed 
								
							 
						 
						
							
							
								
								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.  
							
							... 
							
							
							
							llvm-svn: 176822 
							
						 
						
							2013-03-11 19:53:48 +00:00  
				
					
						
							
							
								 
						
							
								7e4844b353 
								
							 
						 
						
							
							
								
								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 .  
							
							... 
							
							
							
							llvm-svn: 176711 
							
						 
						
							2013-03-08 19:06:24 +00:00  
				
					
						
							
							
								 
						
							
								c60bf548c5 
								
							 
						 
						
							
							
								
								Albert Wong: definition for regex_traits<_CharT>::__regex_word.  
							
							... 
							
							
							
							llvm-svn: 176640 
							
						 
						
							2013-03-07 19:38:08 +00:00  
				
					
						
							
							
								 
						
							
								ead480d30a 
								
							 
						 
						
							
							
								
								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).  
							
							... 
							
							
							
							llvm-svn: 176639 
							
						 
						
							2013-03-07 19:25:03 +00:00  
				
					
						
							
							
								 
						
							
								6e41256f68 
								
							 
						 
						
							
							
								
								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.  
							
							... 
							
							
							
							llvm-svn: 176593 
							
						 
						
							2013-03-06 23:30:19 +00:00  
				
					
						
							
							
								 
						
							
								65f58f3fe8 
								
							 
						 
						
							
							
								
								Have basic_istream::read call sgetn intead of sbumpc individual characters.  This addresses  http://llvm.org/bugs/show_bug.cgi?id=15427 .  
							
							... 
							
							
							
							llvm-svn: 176573 
							
						 
						
							2013-03-06 19:27:56 +00:00  
				
					
						
							
							
								 
						
							
								3fb6c6e50d 
								
							 
						 
						
							
							
								
								Correct silly type-o.  Thanks Richard.  
							
							... 
							
							
							
							llvm-svn: 176568 
							
						 
						
							2013-03-06 18:16:12 +00:00  
				
					
						
							
							
								 
						
							
								53b9ee061f 
								
							 
						 
						
							
							
								
								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 .  
							
							... 
							
							
							
							llvm-svn: 176559 
							
						 
						
							2013-03-06 17:30:26 +00:00  
				
					
						
							
							
								 
						
							
								a9f698009f 
								
							 
						 
						
							
							
								
								Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.  
							
							... 
							
							
							
							llvm-svn: 176026 
							
						 
						
							2013-02-25 15:50:36 +00:00  
				
					
						
							
							
								 
						
							
								c0c9748c11 
								
							 
						 
						
							
							
								
								Constrain bind operator()() to not exist if the call is not valid.  Fixes  http://llvm.org/bugs/show_bug.cgi?id=15295 .  
							
							... 
							
							
							
							llvm-svn: 175774 
							
						 
						
							2013-02-21 18:16:55 +00:00  
				
					
						
							
							
								 
						
							
								b6e5f854f5 
								
							 
						 
						
							
							
								
								Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux  
							
							... 
							
							
							
							llvm-svn: 174669 
							
						 
						
							2013-02-07 22:12:02 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								ead15d1f95 
								
							 
						 
						
							
							
								
								Implement the ATOMIC_*_LOCK_FREE macros.  
							
							... 
							
							
							
							llvm-svn: 173084 
							
						 
						
							2013-01-21 20:39:41 +00:00  
				
					
						
							
							
								 
						
							
								8d3e797444 
								
							 
						 
						
							
							
								
								Donated anonymously:  This enables GCC 4.8.0 to build libc++.  
							
							... 
							
							
							
							llvm-svn: 173060 
							
						 
						
							2013-01-21 17:26:55 +00:00  
				
					
						
							
							
								 
						
							
								3d7eb2f806 
								
							 
						 
						
							
							
								
								Optimize basic_ostream::write by having it call sputn instead of sputc.  
							
							... 
							
							
							
							llvm-svn: 172542 
							
						 
						
							2013-01-15 17:22:03 +00:00  
				
					
						
							
							
								 
						
							
								980e7e7402 
								
							 
						 
						
							
							
								
								Make <cmath> classification macros work with integral types.  
							
							... 
							
							
							
							llvm-svn: 172461 
							
						 
						
							2013-01-14 20:56:22 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								8d9aec8802 
								
							 
						 
						
							
							
								
								Fix exception safety bug in vector::push_back  
							
							... 
							
							
							
							llvm-svn: 172250 
							
						 
						
							2013-01-11 20:36:59 +00:00  
				
					
						
							
							
								 
						
							
								114676622f 
								
							 
						 
						
							
							
								
								atomic_bool was missing (just a typedef to atomic<bool>).  
							
							... 
							
							
							
							llvm-svn: 171498 
							
						 
						
							2013-01-04 18:58:50 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								b5c63a2e07 
								
							 
						 
						
							
							
								
								Restrict optimized __pad_and_output implementation detail to desired releases.  
							
							... 
							
							
							
							llvm-svn: 167980 
							
						 
						
							2012-11-14 21:17:15 +00:00  
				
					
						
							
							
								 
						
							
								119703f984 
								
							 
						 
						
							
							
								
								Dimitry Andric:  Silence some miscellaneous warnings.  
							
							... 
							
							
							
							llvm-svn: 167493 
							
						 
						
							2012-11-06 21:55:44 +00:00  
				
					
						
							
							
								 
						
							
								3e2740a36c 
								
							 
						 
						
							
							
								
								Dimitry Andric:  Silence some warnings in <locale>.  
							
							... 
							
							
							
							llvm-svn: 167492 
							
						 
						
							2012-11-06 21:48:33 +00:00  
				
					
						
							
							
								 
						
							
								a01739a03a 
								
							 
						 
						
							
							
								
								Enable the tuple interface of pair in C++03 mode.  
							
							... 
							
							
							
							llvm-svn: 167491 
							
						 
						
							2012-11-06 21:42:45 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								66e7ed959f 
								
							 
						 
						
							
							
								
								peek should set eofbit if sgetc() returns eof.  
							
							... 
							
							
							
							llvm-svn: 167238 
							
						 
						
							2012-11-01 17:32:07 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								88db3171dd 
								
							 
						 
						
							
							
								
								Don't neglect to "return *this".  
							
							... 
							
							
							
							llvm-svn: 165860 
							
						 
						
							2012-10-13 02:03:45 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								324c084654 
								
							 
						 
						
							
							
								
								Bump _LIBCPP_VERSION to 1002  
							
							... 
							
							
							
							llvm-svn: 164700 
							
						 
						
							2012-09-26 15:38:09 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								a0bc10dca6 
								
							 
						 
						
							
							
								
								Align <atomic> with clang r163964 which disallows const _Atomic types.  
							
							... 
							
							
							
							llvm-svn: 164004 
							
						 
						
							2012-09-16 20:33:09 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								ab303f7e47 
								
							 
						 
						
							
							
								
								Dimitry Andric: FreeBSD porting tweaks for PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER  
							
							... 
							
							
							
							llvm-svn: 163626 
							
						 
						
							2012-09-11 16:10:20 +00:00  
				
					
						
							
							
								 
						
							
								49713b442c 
								
							 
						 
						
							
							
								
								Some minor mingw64 porting tweaks from Glen.  
							
							... 
							
							
							
							llvm-svn: 163120 
							
						 
						
							2012-09-03 18:13:11 +00:00  
				
					
						
							
							
								 
						
							
								aad745a024 
								
							 
						 
						
							
							
								
								Change sleep_for, sleep_until, and the condition_variable timed wait  
							
							... 
							
							
							
							functions to protect against duration and time_point overflow.  Since
we're about to wait anyway, we can afford to spend a few more cycles on
this checking.  I purposefully did not treat the timed try_locks with
overflow checking.  This fixes
http://llvm.org/bugs/show_bug.cgi?id=13721  .  I'm unsure if the standard
needs clarification in this area, or if this is simply QOI.  The
<chrono> facilities were never intended to overflow check, but just to
not overflow if durations stayed within +/- 292 years.
llvm-svn: 162925 
							
						 
						
							2012-08-30 19:14:33 +00:00  
				
					
						
							
							
								 
						
							
								3320c058bf 
								
							 
						 
						
							
							
								
								Hyeon-bin Jeong:  libc++ fails to create any classes inherit from basic_ios if they  
							
							... 
							
							
							
							provided char type other than char or wchar_t. It throw exception during
construction, so there is no chance to imbue own ctype.
This fixes http://llvm.org/bugs/show_bug.cgi?id=13698 
llvm-svn: 162648 
							
						 
						
							2012-08-26 18:05:35 +00:00  
				
					
						
							
							
								 
						
							
								e890ab2377 
								
							 
						 
						
							
							
								
								Michel Morin:  My previous fix for C++03 was incomplete.  
							
							... 
							
							
							
							It does not consider user-defined conversions that convert an rvalue
into an lvalue and works incorrectly for types with such a conversion
operator.
For example, 
    struct foo
    {
        operator int&();
    };
 returns false_type. 
Attached a patch that fixes this problem. 
http://llvm.org/bugs/show_bug.cgi?id=13601 
llvm-svn: 162644 
							
						 
						
							2012-08-25 15:06:50 +00:00  
				
					
						
							
							
								 
						
							
								dbbdd0c1f0 
								
							 
						 
						
							
							
								
								Have basic_istream seekg, putback and unget first clear eofbit.  Fixes  http://llvm.org/bugs/show_bug.cgi?id=13089 .  
							
							... 
							
							
							
							llvm-svn: 162608 
							
						 
						
							2012-08-24 22:03:03 +00:00  
				
					
						
							
							
								 
						
							
								bfd96e11ed 
								
							 
						 
						
							
							
								
								Hyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers.  
							
							... 
							
							
							
							Remaining characters should be discarded once sync() called. If don’t, garbage
characters can be inserted to the front of external buffer in underflow().
Because underflow() copies remaining characters in external buffer to it’s
front. This results wrong characters insertion when seekpos() or seekoff() is
called.
this line should be inserted in sync() just before return:
__extbufnext_ = __extbufend_ = __extbuf_;
2. sync() should use length() rather than out() to calculate offset.
Reversing iterators and calling out() to calculate offset from behind is
working fine in stateless character encoding. However, in stateful encoding,
escape sequences could differ in length. As a result, out() could return wrong
length. 
For example, if we have internal buffer converted from this external sequence:
(capital letters mean escape sequence)
… a a a a B b b b b
out() produces this sequence. 
b b b b A a a a a
Because out() inserts escape sequence A rather than B, result sequence doesn't
match to external sequence. A and B could have different lengths, result offset
could be wrong value too.
length() method in codecvt is right for calculating offset, but it counts
offset from the beginning of buffer. So it requires another state member
variable to hold state before conversion.
Fixes http://llvm.org/bugs/show_bug.cgi?id=13667 
llvm-svn: 162601 
							
						 
						
							2012-08-24 21:20:56 +00:00  
				
					
						
							
							
								 
						
							
								49a37bbb9f 
								
							 
						 
						
							
							
								
								Fix basic_filebuf's internal buffer is shrinking when using with some codecvt.   http://llvm.org/bugs/show_bug.cgi?id=13602  
							
							... 
							
							
							
							llvm-svn: 162585 
							
						 
						
							2012-08-24 20:37:00 +00:00  
				
					
						
							
							
								 
						
							
								45c03a8f8d 
								
							 
						 
						
							
							
								
								Fixed order of calling use_facet vs setbuf in basic_filebuf default constructor.  
							
							... 
							
							
							
							llvm-svn: 162571 
							
						 
						
							2012-08-24 18:06:47 +00:00  
				
					
						
							
							
								 
						
							
								cc27317a62 
								
							 
						 
						
							
							
								
								basic_filebuf needs to delay obtaining a codecvt facet from the global locale to give the client a chance to imbue the proper locale.  Fixes  http://llvm.org/bugs/show_bug.cgi?id=13663 .  
							
							... 
							
							
							
							llvm-svn: 162567 
							
						 
						
							2012-08-24 16:52:47 +00:00  
				
					
						
							
							
								 
						
							
								a3b7a802cc 
								
							 
						 
						
							
							
								
								In C++03 mode add an explicit conversion from int to the emulated class enum.  Fixes a problem reported by C. Bergström.  
							
							... 
							
							
							
							llvm-svn: 162189 
							
						 
						
							2012-08-19 17:14:47 +00:00  
				
					
						
							
							
								 
						
							
								e4b2a743b8 
								
							 
						 
						
							
							
								
								Patch contributed by Dev Dude for mingw64 port.  
							
							... 
							
							
							
							llvm-svn: 162188 
							
						 
						
							2012-08-19 15:13:16 +00:00  
				
					
						
							
							
								 
						
							
								a0b42cacbf 
								
							 
						 
						
							
							
								
								Apply patches supplied by Michel Morin in  http://llvm.org/bugs/show_bug.cgi?id=13601  to correct bugs in is_convertible for the case that the intrinsic __is_convertible_to is not available.  
							
							... 
							
							
							
							llvm-svn: 162111 
							
						 
						
							2012-08-17 17:54:11 +00:00  
				
					
						
							
							
								 
						
							
								7ee271360d 
								
							 
						 
						
							
							
								
								Consistently label __bit_array as a struct, not a class.  
							
							... 
							
							
							
							llvm-svn: 162108 
							
						 
						
							2012-08-17 17:10:18 +00:00  
				
					
						
							
							
								 
						
							
								4179da6a6a 
								
							 
						 
						
							
							
								
								Patch constributed by Michel Moren in  http://llvm.org/bugs/show_bug.cgi?id=13592  .  Fixes is_convertible<From, To> when To is an abstract type.  
							
							... 
							
							
							
							llvm-svn: 161755 
							
						 
						
							2012-08-13 12:29:17 +00:00  
				
					
						
							
							
								 
						
							
								1237dccaea 
								
							 
						 
						
							
							
								
								std::equal operating on non-const __bit_iterators was not working.  This fixes it.  
							
							... 
							
							
							
							llvm-svn: 161309 
							
						 
						
							2012-08-05 21:43:11 +00:00  
				
					
						
							
							
								 
						
							
								aca09de378 
								
							 
						 
						
							
							
								
								Performance tweaking rotate.  
							
							... 
							
							
							
							rotate is a critical algorithm because it is often used by other algorithms,
both std and non-std.  The main thrust of this optimization is a specialized
algorithm when the 'distance' to be shifted is 1 (either left or right).  To my
surprise, this 'optimization' was not effective for types like std::string.
std::string favors rotate algorithms which only use swap.  But for types like
scalars, and especially when the sequence is random access, these new
specializations are a big win.  If it is a vector<size_t> for example, the
rotate is done via a memmove and can be several times faster than the gcd
algorithm.
I'm using is_trivially_move_assignable to distinguish between types like int and
types like string.  This is obviously an ad-hoc approximation, but I haven't
found a case where it doesn't give good results.
I've used a 'static if' (with is_trivially_move_assignable) in three places. 
Testing with both -Os and -O3 showed that clang eliminated all code not be
executed by the 'static if' (including the 'static if' itself).
llvm-svn: 161247 
							
						 
						
							2012-08-03 18:01:20 +00:00  
				
					
						
							
							
								 
						
							
								d77851e837 
								
							 
						 
						
							
							
								
								Implement [util.smartptr.shared.atomic].  This is the last unimplemented  
							
							... 
							
							
							
							section in libc++.  This requires a recompiled dylib.  Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.
The implementation is not lock free.  After considerable thought, I know of no
way to make the implementation lock free.  Ideas welcome along that front.  But
changing the ABI of shared_ptr is not on the table at this point.
The mutex used to lock these function is encapsulated by std::__sp_mut.  The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members.  Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex.  That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.
I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks.  Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait).  In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).
The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr.  The constant 16 is a ball-park reasonable space/time
tradeoff.
std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function.  I had thought we had already done this, but I was mistaken.
All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).
llvm-svn: 160940 
							
						 
						
							2012-07-30 01:40:57 +00:00  
				
					
						
							
							
								 
						
							
								c904ad4518 
								
							 
						 
						
							
							
								
								Patch by Andrew C. Morrow:  shims to work around macroized getc and putc on linux.  On my eglibc 2.13 based Debian system 'getc' is a macro defined in  
							
							... 
							
							
							
							/usr/include/stdio.h. This decision to make it a macro doesn't seem to
be guarded by any feature test macro as far as I can see.
llvm-svn: 160799 
							
						 
						
							2012-07-26 20:01:13 +00:00  
				
					
						
							
							
								 
						
							
								a1d07d57a7 
								
							 
						 
						
							
							
								
								<algorithm> no longer needs to include <cstdlib>, but can get away with just <cstddef>.  This was brought to my attention by Salvatore Benedetto in his port to a bare-metal coretex-m3.  This exposed two test bugs where an explicit #include <cstdlib> was needed.  
							
							... 
							
							
							
							llvm-svn: 160786 
							
						 
						
							2012-07-26 17:09:09 +00:00  
				
					
						
							
							
								 
						
							
								6a03f169db 
								
							 
						 
						
							
							
								
								locale::id really needs to be constructed at compile time.  
							
							... 
							
							
							
							llvm-svn: 160785 
							
						 
						
							2012-07-26 16:14:37 +00:00  
				
					
						
							
							
								 
						
							
								535a86c3f8 
								
							 
						 
						
							
							
								
								libc++: switch from using _ATTRIBUTE(noreturn) (which conflicts with a  
							
							... 
							
							
							
							platform-provided macro on some systems) to _LIBCPP_NORETURN.
llvm-svn: 160773 
							
						 
						
							2012-07-26 02:04:22 +00:00  
				
					
						
							
							
								 
						
							
								9d772d17b3 
								
							 
						 
						
							
							
								
								Apple LWG 2067:  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3318.html#2067  .  This is the only actionable change that has been made to the C++ draft since C++11.  In general it has not been decided exactly how libc++ will track changes made to C++11.  New features and design changes will probably be #ifdef'd, especially if they are not backwards compatible.  Defects and 'dumb mistakes' are more likely to just be put in.  Decisions on telling one from the other will be made on a case by case basis.  
							
							... 
							
							
							
							llvm-svn: 160608 
							
						 
						
							2012-07-21 19:34:12 +00:00  
				
					
						
							
							
								 
						
							
								a4820bc4d5 
								
							 
						 
						
							
							
								
								noexcept applied to <future>.  
							
							... 
							
							
							
							llvm-svn: 160607 
							
						 
						
							2012-07-21 17:46:55 +00:00  
				
					
						
							
							
								 
						
							
								36101a5b0a 
								
							 
						 
						
							
							
								
								noexcept applied to <thread>.  
							
							... 
							
							
							
							llvm-svn: 160606 
							
						 
						
							2012-07-21 16:50:47 +00:00  
				
					
						
							
							
								 
						
							
								45c663db4e 
								
							 
						 
						
							
							
								
								noexcept applied to <condition_variable>.  
							
							... 
							
							
							
							llvm-svn: 160605 
							
						 
						
							2012-07-21 16:32:53 +00:00  
				
					
						
							
							
								 
						
							
								02e610ef34 
								
							 
						 
						
							
							
								
								noexcept and constexpr applied to <mutex>.  
							
							... 
							
							
							
							llvm-svn: 160604 
							
						 
						
							2012-07-21 16:13:09 +00:00  
				
					
						
							
							
								 
						
							
								42be98ab54 
								
							 
						 
						
							
							
								
								noexcept and constexpr applied to <regex>.  
							
							... 
							
							
							
							llvm-svn: 160594 
							
						 
						
							2012-07-21 01:31:58 +00:00  
				
					
						
							
							
								 
						
							
								5d926bf1b8 
								
							 
						 
						
							
							
								
								noexcept and constexpr applied to <ios>.  
							
							... 
							
							
							
							llvm-svn: 160593 
							
						 
						
							2012-07-21 01:03:40 +00:00  
				
					
						
							
							
								 
						
							
								bf882037be 
								
							 
						 
						
							
							
								
								noexcept applied to <valarray>.  
							
							... 
							
							
							
							llvm-svn: 160592 
							
						 
						
							2012-07-21 00:51:28 +00:00  
				
					
						
							
							
								 
						
							
								f4e11de8e8 
								
							 
						 
						
							
							
								
								constexpr applied to <complex>.  
							
							... 
							
							
							
							llvm-svn: 160585 
							
						 
						
							2012-07-20 22:18:27 +00:00  
				
					
						
							
							
								 
						
							
								00586de436 
								
							 
						 
						
							
							
								
								noexcept applied to <random>.  
							
							... 
							
							
							
							llvm-svn: 160579 
							
						 
						
							2012-07-20 21:44:27 +00:00  
				
					
						
							
							
								 
						
							
								8e882dcb2e 
								
							 
						 
						
							
							
								
								noexcept applied to <iterator>.  
							
							... 
							
							
							
							llvm-svn: 160565 
							
						 
						
							2012-07-20 19:36:34 +00:00  
				
					
						
							
							
								 
						
							
								397717b7c8 
								
							 
						 
						
							
							
								
								constexpr applied to <array>.  
							
							... 
							
							
							
							llvm-svn: 160564 
							
						 
						
							2012-07-20 19:20:49 +00:00  
				
					
						
							
							
								 
						
							
								931644bfec 
								
							 
						 
						
							
							
								
								constexpr applied to <string>.  
							
							... 
							
							
							
							llvm-svn: 160563 
							
						 
						
							2012-07-20 19:09:12 +00:00  
				
					
						
							
							
								 
						
							
								14c56f6c4a 
								
							 
						 
						
							
							
								
								Further tweaks on relaxing complete type checking for function.  
							
							... 
							
							
							
							llvm-svn: 160562 
							
						 
						
							2012-07-20 18:56:07 +00:00  
				
					
						
							
							
								 
						
							
								403845ba75 
								
							 
						 
						
							
							
								
								Relax the complete-type checks that are happening under __invokable<Fp, Args...> to only check Fp, and not Args... .  This should be sufficient to give the desired high quality diagnostics under both bind and function.  And this allows a test reported by Rich E on cfe-dev to pass.  Tracked by <rdar://problem/11880602>.  
							
							... 
							
							
							
							llvm-svn: 160285 
							
						 
						
							2012-07-16 16:17:34 +00:00  
				
					
						
							
							
								 
						
							
								c033115394 
								
							 
						 
						
							
							
								
								Applied constexpr to <chrono>.  
							
							... 
							
							
							
							llvm-svn: 160184 
							
						 
						
							2012-07-13 19:17:27 +00:00  
				
					
						
							
							
								 
						
							
								9146984e73 
								
							 
						 
						
							
							
								
								Fixed a bug in wstring_convert concerning zero-length inputs.  Thanks to Jonathan Coxhead for reporting this bug.  
							
							... 
							
							
							
							llvm-svn: 160136 
							
						 
						
							2012-07-12 18:07:41 +00:00