Age | Commit message (Collapse) | Author | Files | Lines |
|
------------------------------------------------------------------------
r279008 | marshall | 2016-08-17 16:24:02 -0700 (Wed, 17 Aug 2016) | 1 line
make the associative containers do the right thing for propogate_on_container_assignment. Fixes bug #29001. Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure.
------------------------------------------------------------------------
llvm-svn: 279017
|
|
------------------------------------------------------------------------
r278904 | marshall | 2016-08-16 22:58:40 -0700 (Tue, 16 Aug 2016) | 1 line
Support allocators with explicit conversion constructors. Fixes bug #29000
------------------------------------------------------------------------
llvm-svn: 279015
|
|
------------------------------------------------------------------------
r278357 | compnerd | 2016-08-11 09:58:12 -0700 (Thu, 11 Aug 2016) | 6 lines
test: relax the FS test a slight bit to be more reliable
Some filesystems track atime always. This relaxes the test to accept either a
filesystem which does not accurately track atime or does track the atime
accurately. This allows the test to pass on filesystems mounted with
`strictatime` on Linux or on macOS.
------------------------------------------------------------------------
llvm-svn: 278538
|
|
------------------------------------------------------------------------
r278282 | marshall | 2016-08-10 13:04:46 -0700 (Wed, 10 Aug 2016) | 1 line
std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.
------------------------------------------------------------------------
llvm-svn: 278426
|
|
------------------------------------------------------------------------
r278387 | marshall | 2016-08-11 11:46:24 -0700 (Thu, 11 Aug 2016) | 1 line
Remove test for the sign of a NaN - doesn't work on MIPS, not strictly legal. Fixes bug 28936
------------------------------------------------------------------------
llvm-svn: 278425
|
|
------------------------------------------------------------------------
r276003 | ericwf | 2016-07-19 11:56:20 -0600 (Tue, 19 Jul 2016) | 35 lines
Fix undefined behavior in __tree
Summary:
This patch attempts to fix the undefined behavior in __tree by changing the node pointer types used throughout. The pointer types are changed for raw pointers in the current ABI and for fancy pointers in ABI V2 (since the fancy pointer types may not be ABI compatible).
The UB in `__tree` arises because tree downcasts the embedded end node and then deferences that pointer. Currently there are 3 node types in __tree.
* `__tree_end_node` which contains the `__left_` pointer. This node is embedded within the container.
* `__tree_node_base` which contains `__right_`, `__parent_` and `__is_black`. This node is used throughout the tree rebalancing algorithms.
* `__tree_node` which contains `__value_`.
Currently `__tree` stores the start of the tree, `__begin_node_`, as a pointer to a `__tree_node`. Additionally the iterators store their position as a pointer to a `__tree_node`. In both of these cases the pointee can be the end node. This is fixed by changing them to store `__tree_end_node` pointers instead.
To make this change I introduced an `__iter_pointer` typedef which is defined to be a pointer to either `__tree_end_node` in the new ABI or `__tree_node` in the current one.
Both `__tree::__begin_node_` and iterator pointers are now stored as `__iter_pointers`.
The other situation where `__tree_end_node` is stored as the wrong type is in `__tree_node_base::__parent_`. Currently `__left_`, `__right_`, and `__parent_` are all `__tree_node_base` pointers. Since the end node will only be stored in `__parent_` the fix is to change `__parent_` to be a pointer to `__tree_end_node`.
To make this change I introduced a `__parent_pointer` typedef which is defined to be a pointer to either `__tree_end_node` in the new ABI or `__tree_node_base` in the current one.
Note that in the new ABI `__iter_pointer` and `__parent_pointer` are the same type (but not in the old one). The confusion between these two types is unfortunate but it was the best solution I could come up with that maintains the ABI.
The typedef changes force a ton of explicit type casts to correct pointer types and to make current code compatible with both the old and new pointer typedefs. This is the bulk of the change and it's really messy. Unfortunately I don't know how to avoid it.
Please let me know what you think.
Reviewers: howard.hinnant, mclow.lists
Subscribers: howard.hinnant, bbannier, cfe-commits
Differential Revision: https://reviews.llvm.org/D20786
------------------------------------------------------------------------
llvm-svn: 276212
|
|
Reviewed at https://reviews.llvm.org/D21637.
llvm-svn: 275819
|
|
_LIBCPP_CXX03_LANG'. No functionality change.
llvm-svn: 275787
|
|
Constructing a std::locale object from an empty string selects the language
from the current environment variables. If the environment variables name
a locale that doesn't exist, or isn't installed, then the construction of
facets using that locale may throw.
This patch removes tests that use 'std::locale l("")'.
The optimal solution would be to manually set the environment variables
in the test. Unfortunately there is no portable way to do this.
llvm-svn: 275772
|
|
man page for mkdir says: "If the parent directory has the set-group-ID bit set,
then so will the newly created directory."
Differential Revision: https://reviews.llvm.org/D22265
llvm-svn: 275760
|
|
This patch updates the way libc++ handles checking for libatomic, in part
to prepare for https://reviews.llvm.org/D22073.
Changes:
* 'LIBCXX_HAS_ATOMIC_LIB' is now set whenever libatomic is available even libc++
doesn't need to manually link it.
* 'LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB' is now used to detect when libatomic
needs to be manually linked.
* 'LIBCXX_HAS_ATOMIC_LIB' now adds 'libatomic' as a available feature in the
test suite.
llvm-svn: 275759
|
|
llvm-svn: 275757
|
|
llvm-svn: 275754
|
|
llvm-svn: 275753
|
|
llvm-svn: 275751
|
|
llvm-svn: 275750
|
|
configuration in-tree.
This patch does the following:
* It renames `_LIBCPP_TRIVIAL_PAIR_COPY_CTOR` to `_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR`.
* It automatically enables this option on FreeBSD in ABI V1, since that's the current ABI FreeBSD ships.
* It cleans up the handling of this option in `std::pair`.
I would like the sign off from the FreeBSD maintainers. They will no longer need to keep their `__config` changes downstream.
I'm still hoping to come up with a better way to maintain the ABI without needing these constructors.
Reviewed in https://reviews.llvm.org/D21329
llvm-svn: 275749
|
|
llvm-svn: 275748
|
|
This patch upgrades <tuple> to be C++17 compliant by implementing:
* tuple_size_v: This was forgotten when implementing the other _v traits.
* std::apply: This was added via LFTS v1 in p0220r1.
* std::make_from_tuple: This was added in p0209r2.
llvm-svn: 275745
|
|
This patch implements a simple optimization in __hash_table::find. When iterating
the found bucket we only constrain the bucket elements hash if it doesn't
already match the unconstrained hash of the specified key. This prevent
the performance of an expensive modulo operation.
Since the bucket element almost always matches the key, especially when the
load factor is low, this optimization has large performance impacts. For
a unordered_set<int> of random integers this patch improves the performance of
'find(...)' by 40%.
llvm-svn: 275734
|
|
llvm-svn: 275732
|
|
appropriately. Fixes PR#28217.
llvm-svn: 275280
|
|
llvm-svn: 275211
|
|
As discussed in http://reviews.llvm.org/D22073
llvm-svn: 275210
|
|
is part of LWG#2582
llvm-svn: 275184
|
|
llvm-svn: 275177
|
|
llvm-svn: 275176
|
|
From r229162:
Visual Studio's SAL extension uses a macro named __deallocate. This
macro is used pervasively
Using -Werror when building for Windows can force the use of -Wno-#warnings
specifically because of this __deallocate #warning. Instead of forcing
builds to disable all #warnings, this option allows libc++ to be built
without this particular warning, while leaving other #warnings enabled.
Patch by Dave Lee!
llvm-svn: 275172
|
|
llvm-svn: 275171
|
|
llvm-svn: 275170
|
|
This cleans up a previous optimization attempt in hash, and results in
additional performance improvements over that previous attempt. Additionally
this new optimization does not hinder the power of 2 bucket count optimization.
llvm-svn: 275114
|
|
Fixes PR#28412. Thanks to Jonathan Wakely for the report.
llvm-svn: 275105
|
|
llvm-svn: 275094
|
|
llvm-svn: 275089
|
|
llvm-svn: 274882
|
|
(subtly) changes the return type of operator-(Iter1, Iter2) where Iter1 is a reverse iterator or a move_iterator, and Iter2 is some other move/reverse iterator type. In practice, I believe that almost every time the second param will be const_XXX and this will mean that the return type will be the same as it was before.
llvm-svn: 274880
|
|
Summary: The current implementations of __hash_table::find used by std::unordered_set/unordered_map call key_eq on each key that lands in the same bucket as the key you're looking for. However, since equal objects mush hash to the same value, you can short-circuit the possibly expensive call to key_eq by checking the hashes first.
Reviewers: EricWF
Subscribers: kmensah, cfe-commits
Differential Revision: http://reviews.llvm.org/D21510
llvm-svn: 274857
|
|
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/244/
llvm-svn: 274651
|
|
no more
llvm-svn: 274605
|
|
llvm-svn: 274424
|
|
This patch improves the performance of unordered_set's find by 45% when
the value exists within the set. __hash_tables find method
needs to check if it's reached the end of the bucket by constraining the
hash of the current node and checking it against the bucket index. However
constraining the hash is an expensive operations and it can be avoided if the
two unconstrained hashes are equal. This patch applies that optimization.
This patch also adds a top level directory called benchmarks. 'benchmarks/'
is intended to store any/all benchmarks written for the standard library.
Currently nothing is done with files under 'benchmarks/' but I would like
to move towards introducing a formal format and test runner.
llvm-svn: 274423
|
|
llvm-svn: 274422
|
|
clang.
llvm-svn: 274419
|
|
llvm-svn: 274418
|
|
llvm-svn: 274414
|
|
llvm-svn: 274413
|
|
llvm-svn: 274408
|
|
llvm-svn: 274407
|
|
llvm-svn: 274404
|
|
llvm-svn: 274403
|