Howard Hinnant
35abaab7d3
This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.
...
llvm-svn: 180811
2013-04-30 21:44:48 +00:00
Howard Hinnant
210051548e
Modest performance improvement for std::string's operator==.
...
llvm-svn: 180072
2013-04-22 23:55:13 +00:00
Howard Hinnant
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
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
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
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
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
88db3171dd
Don't neglect to "return *this".
...
llvm-svn: 165860
2012-10-13 02:03:45 +00:00
Howard Hinnant
931644bfec
constexpr applied to <string>.
...
llvm-svn: 160563
2012-07-20 19:09:12 +00:00
Howard Hinnant
53d2fb0aa2
Installation of CityHash by Craig Silverstein
...
llvm-svn: 146329
2011-12-10 20:28:56 +00:00
Howard Hinnant
f3d14a65ca
Starting using murmur2 when combining multiple size_t's into a single hash, and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway.
...
llvm-svn: 145795
2011-12-05 00:08:45 +00:00
Howard Hinnant
c206366fd7
Quash a whole bunch of warnings
...
llvm-svn: 145624
2011-12-01 20:21:04 +00:00
Howard Hinnant
ab4f438239
Add protection from min/max macros
...
llvm-svn: 145407
2011-11-29 16:45:27 +00:00
Howard Hinnant
e4383379ae
More windows port work by Ruben Van Boxem
...
llvm-svn: 142732
2011-10-22 20:59:45 +00:00
Howard Hinnant
073458b1ab
Windows support by Ruben Van Boxem.
...
llvm-svn: 142235
2011-10-17 20:05:10 +00:00
Howard Hinnant
8668139f36
Fix const correctness bug in __move_assign. Found and fixed by Ion Gaztañaga.
...
llvm-svn: 139032
2011-09-02 20:42:31 +00:00
Howard Hinnant
e41124ade1
Don't move assign string::allocator_type when propagate_on_container_move_assignment is false.
...
llvm-svn: 137862
2011-08-17 20:36:18 +00:00
Howard Hinnant
54976f2619
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
...
llvm-svn: 137522
2011-08-12 21:56:02 +00:00
Alexis Hunt
8d2ed56644
Add a new hash class in __gnu_ext for the extension containers. There
...
are two motivations for this.
First, this allows users who are specializing __gnu_ext::hash to
continue doing so without changing their code.
Second, SGI specifies hash overloads for char* and const char* that
perform a hash of the string, not of the pointer.
In order to support this, the hashing code for string is factored out.
llvm-svn: 136539
2011-07-29 23:31:56 +00:00
Howard Hinnant
520a61383c
Optimization of string::operator< by M.E. O'Neill. Discussion in http://llvm.org/bugs/show_bug.cgi?id=10461
...
llvm-svn: 135893
2011-07-24 21:45:06 +00:00
Howard Hinnant
5b0bdc2043
http://llvm.org/bugs/show_bug.cgi?id=10461
...
llvm-svn: 135873
2011-07-24 15:07:21 +00:00
Howard Hinnant
e3163f5ae3
http://llvm.org/bugs/show_bug.cgi?id=10390
...
llvm-svn: 135393
2011-07-18 15:51:59 +00:00
Howard Hinnant
11af28bdbd
Fixing up some ABI issues
...
llvm-svn: 134639
2011-07-07 21:03:52 +00:00
Howard Hinnant
ce48a1137d
_STD -> _VSTD to avoid macro clash on windows
...
llvm-svn: 134190
2011-06-30 21:18:19 +00:00
Howard Hinnant
ce53420e37
Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.
...
llvm-svn: 133008
2011-06-14 19:58:17 +00:00
Howard Hinnant
2d45a18c24
Bring noexcept for <string> inline with other containers.
...
llvm-svn: 132573
2011-06-03 18:40:47 +00:00
Howard Hinnant
76c7cd0e15
noexcept for Chapter 21 [strings].
...
llvm-svn: 132296
2011-05-29 19:57:12 +00:00
Howard Hinnant
ad16003517
Add always_inline to string move constructors
...
llvm-svn: 124252
2011-01-26 00:06:59 +00:00
Howard Hinnant
36fd9f96cf
Reverting an old optimization that conflicts with the new allocator model, and causes some test casees to compile that shouldn't.
...
llvm-svn: 122830
2011-01-04 19:53:31 +00:00
Howard Hinnant
c950e77d1d
Effort to reduce the number of exported symbols
...
llvm-svn: 122057
2010-12-17 14:46:43 +00:00
Howard Hinnant
5ba1459c4c
LWG 1323
...
llvm-svn: 119560
2010-11-17 21:11:40 +00:00
Howard Hinnant
57d1ebcc38
Update <string> to use allocator_traits.
...
llvm-svn: 119522
2010-11-17 17:55:08 +00:00
Howard Hinnant
e060133553
visibility-decoration.
...
llvm-svn: 114671
2010-09-23 17:31:07 +00:00
Howard Hinnant
f9cca3b7d0
I am experimenting with putting visibility-default attributes on all struct/classes in libc++. This checkin decorates only basic_string and vector as an experiment, and for review by those in this audience that might know more about visibilty than I do. If I get no negative feedback on this procedure I will begin to decorate the entire library in this way.
...
llvm-svn: 113590
2010-09-10 16:42:26 +00:00
Howard Hinnant
7609c9b665
Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.
...
llvm-svn: 113086
2010-09-04 23:28:19 +00:00
Howard Hinnant
b3371f6f49
Fixing whitespace problems
...
llvm-svn: 111750
2010-08-22 00:02:43 +00:00
Howard Hinnant
eb2692571f
patch by Jesse Towner, and bug fix by Sebastian Redl
...
llvm-svn: 110724
2010-08-10 20:48:29 +00:00
Howard Hinnant
cbbf633edb
[string.conversions]
...
llvm-svn: 105336
2010-06-02 18:20:39 +00:00
Howard Hinnant
128ba7191d
patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.
...
llvm-svn: 104516
2010-05-24 17:49:41 +00:00
Howard Hinnant
deb23ecdf9
[rand.dist.bern.bin]. The evaluation function for this binomial distribution is hopefully just a placeholder. It is using the simplest and slowest method for computing the distribution and needs to be upgraded.
...
llvm-svn: 103524
2010-05-11 23:26:59 +00:00
Howard Hinnant
5b08a8a432
Wiped out some non-ascii characters that snuck into the copyright.
...
llvm-svn: 103516
2010-05-11 21:36:01 +00:00
Howard Hinnant
3e519524c1
libcxx initial import
...
llvm-svn: 103490
2010-05-11 19:42:16 +00:00