summaryrefslogtreecommitdiffstats
path: root/libcxx/include/bitset
Commit message (Collapse)AuthorAgeFilesLines
* Ensure bitset's string constructor doesn't poison the overload set.Eric Fiselier2019-07-011-2/+2
| | | | llvm-svn: 364842
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [libcxx] Call __count_bool_true for bitset countAdhemerval Zanella2019-01-111-1/+1
| | | | | | | | | | | | | | | | | This patch aims to help clang with better information so it can inline __bit_reference count function usage for both std::biset. Current clang inliner can not infer that the passed typed will be used only to select the optimized variant, it evaluates the type argument and type check as a load plus compare (although later optimization phases correctly optimized this out). It is mainly to help llvm inliner to generate better code for std::bitset count for aarch64. It helps on both runtime and code size, since if inline decides that _VSTD::count should not be inlined the vectorization will create both aligned and unaligned variants (which add both code size and runtime costs) llvm-svn: 350936
* [NFC][libc++] Consistently use spaces to indentLouis Dionne2018-08-031-6/+6
| | | | | | rdar://problem/19988944 llvm-svn: 338933
* Fix problems with r'890 when building on machines where sizeof(size_t) != ↵Marshall Clow2017-11-271-3/+13
| | | | | | sizeof(unsigned long long) and C++03 llvm-svn: 319106
* Fix PR#35438 - bitset constructor does not zero unused bitsMarshall Clow2017-11-271-1/+4
| | | | llvm-svn: 319074
* [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier2017-05-311-5/+9
| | | | | | | | | | | | | | | | Summary: This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header. Reviewers: mclow.lists, bcraig, compnerd, EricWF Reviewed By: EricWF Subscribers: cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33080 llvm-svn: 304357
* Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <bitset>, <ios>, ↵Eric Fiselier2017-04-191-8/+8
| | | | | | <locale>, and <iterator> llvm-svn: 300648
* [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VISEric Fiselier2017-01-041-3/+3
| | | | | | | | | | | | | The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates). This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS. llvm-svn: 291035
* Avoid narrowing warnings in __bitset constructorDimitry Andric2016-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | When <bitset> is compiled with warnings enabled, on a platform where size_t is 4 bytes, it results in errors similar to: bitset:265:16: error: non-constant-expression cannot be narrowed from type 'unsigned long long' to '__storage_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] : __first_{__v, __v >> __bits_per_word} ^~~ bitset:676:52: note: in instantiation of member function 'std::__1::__bitset<2, 53>::__bitset' requested here bitset(unsigned long long __v) _NOEXCEPT : base(__v) {} ^ Fix these by casting the initializer list elements to __storage_type. Reviewers: mclow.lists, EricWF Differential Revision: https://reviews.llvm.org/D23960 llvm-svn: 280543
* Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception ↵Marshall Clow2016-08-251-48/+18
| | | | | | type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. llvm-svn: 279744
* Fix most GCC attribute ignored warningsEric Fiselier2016-04-211-1/+1
| | | | llvm-svn: 267074
* Add 3 more missing inline/visibility attributes.Evgeniy Stepanov2015-12-091-0/+1
| | | | | | | | | These are the cases when an out-of-class definition of a method is marked _LIBCPP_INLINE_VISIBILITY, but the in-class declaration is not. This will start failing when (or if) we switch to attribute((internal_linkage)). llvm-svn: 255166
* Cleanup: move visibility/linkage attributes to the first declaration.Evgeniy Stepanov2015-11-071-41/+82
| | | | | | | | | | | | This change moves visibility attributes from out-of-class method definitions to in-class declaration. This is needed for a switch to attribute((internal_linkage)) (see http://reviews.llvm.org/D13925) which can only appear on the first declaration. This change does not touch istream/ostream/streambuf. They are handled separately in http://reviews.llvm.org/D14409. llvm-svn: 252385
* Make locales (and transitively, std::endl) work reliably with gcc.Nico Weber2014-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | libc++ currently relies on undefined initialization order of global initializers when using gcc: 1. __start_std_streams in iostream.cpp calls locale::id::_init, which assigns an id to each locale::facet in an initializer 2. Every facet has a static locale::id id, whose constructor sets the facet's id to 0 If 2 runs after 1, it clobbers the facet's assigned consecutive id, causing exceptions to be thrown when e.g. running code like "cout << endl". To fix this, let _LIBCPP_CONSTEXPR evaluate to "constexpr" instead of nothing with gcc. locale::id's constructor is marked _LIBCPP_CONSTEXPR, which ensures that it won't get an initializer that could potentially run after the iostream.cpp initializer. (This remains broken when building with msvc.) Also switch constexpr-specific code in bitset to use __SIZEOF_SIZE_T__ instead of __SIZE_WIDTH__, because gcc doesn't define the latter. Pair-programmed/debugged with Dana Jansens. llvm-svn: 210188
* Nico Rieck: this patch series fixes visibility issues on Windows as ↵Howard Hinnant2013-08-121-4/+4
| | | | | | explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>. llvm-svn: 188192
* No functionality change at this time. I've split _LIBCPP_VISIBLE up into ↵Howard Hinnant2013-03-061-4/+4
| | | | | | 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
* Correct silly type-o. Thanks Richard.Howard Hinnant2013-03-061-1/+1
| | | | llvm-svn: 176568
* The bitset(unsigned long long) constructor was broken by the constexpr ↵Howard Hinnant2013-03-061-0/+7
| | | | | | additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444. llvm-svn: 176559
* Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you ↵Howard Hinnant2012-09-141-1/+1
| | | | | | send me a patch to CREDITS.TXT? llvm-svn: 163862
* Consistently label __bit_array as a struct, not a class.Howard Hinnant2012-08-171-2/+2
| | | | llvm-svn: 162108
* Apply constexpr to <bitset>.Howard Hinnant2012-07-071-13/+37
| | | | llvm-svn: 159899
* SFINAE __bit_iterator such that it will only get instantiated with a ↵Howard Hinnant2012-05-071-3/+3
| | | | | | container that has the nested type __storage_type. This prevents accidental instantiation such as in http://llvm.org/bugs/show_bug.cgi?id=12755. This fixes http://llvm.org/bugs/show_bug.cgi?id=12755. llvm-svn: 156308
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-5/+5
| | | | llvm-svn: 145624
* Further macro protection by replacing _[A-Z] with _[A-Z]pHoward Hinnant2011-11-291-6/+6
| | | | llvm-svn: 145410
* Add protection from min/max macrosHoward Hinnant2011-11-291-0/+2
| | | | llvm-svn: 145407
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* http://llvm.org/bugs/show_bug.cgi?id=10390Howard Hinnant2011-07-181-0/+8
| | | | llvm-svn: 135393
* http://llvm.org/bugs/show_bug.cgi?id=10248Howard Hinnant2011-07-021-0/+9
| | | | llvm-svn: 134327
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-22/+22
| | | | llvm-svn: 134190
* noexcept for <bitset>.Howard Hinnant2011-05-271-132/+132
| | | | llvm-svn: 132216
* LWG 1325Howard Hinnant2010-11-171-12/+17
| | | | llvm-svn: 119571
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* visibility-decoration.Howard Hinnant2010-09-211-2/+4
| | | | llvm-svn: 114486
* Fixing whitespace problemsHoward Hinnant2010-08-221-43/+43
| | | | llvm-svn: 111750
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+1022
llvm-svn: 103490
OpenPOWER on IntegriCloud