| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch add support for "fancy pointers/allocators" as well as fixing support for shared_pointer and "minimal" allocators.
Fancy pointers are class types that meet the NullablePointer requirements. In our case they are created by fancy allocators. `support/min_allocator.h` is an archetype for these types.
There are three types of changes made in this patch:
1. `_Alloc::template rebind<T>::other` -> `__allocator_traits_rebind<_Alloc, T>::type`. This change was made because allocators don't need a rebind template. `__allocator_traits_rebind` is used instead of `allocator_traits::rebind` because use of `allocator_traits::rebind` requires a workaround for when template aliases are unavailable.
2. `a.deallocate(this, 1)` -> `a.deallocate(pointer_traits<self>::pointer_to(*this), 1)`. This change change is made because fancy pointers aren't always constructible from raw pointers.
3. `p.get()` -> `addressof(*p.get())`. Fancy pointers aren't actually a pointer. When we need a "real" pointer we take the address of dereferencing the fancy pointer. This should give us the actual raw pointer.
Test Plan: Tests were added using `support/min_allocator.h` to each affected shared_ptr overload and creation function. These tests can only be executed in C++11 or greater since min_allocator is only available then. A extra test was added for the non-variadic versions of allocate_shared.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4859
llvm-svn: 220469
|
| |
|
|
|
|
| |
support first.
llvm-svn: 220465
|
| |
|
|
|
|
|
| |
Clang 3.6 no longer links the sanitizer runtime library dependancies when
-nodefaultlibs is used. This patch manually links in a missing dependancy.
llvm-svn: 220463
|
| |
|
|
| |
llvm-svn: 220296
|
| |
|
|
|
|
| |
available if <array> or <utility> are included (not just <tuple>). We already do this. Add some tests to make sure that this remains true.
llvm-svn: 220295
|
| |
|
|
| |
llvm-svn: 220260
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not along linker paths
Summary:
This is the second attempt at allowing for the use of libraries that the linker cannot find. The first attempt used `CMAKE_LIBRARY_PATH` and `find_library` to select which ABI library should be used. There were a number of problems with this approach:
- `find_library` didn't work with cmake targets (ie in-tree libcxxabi build)
- It wasn't always possible to determine where `find_library` actually found your library.
- `target_link_libraries` inserted the path of the ABI library into libc++'s RPATH when `find_library` was used.
- Linking libc++ and it's ABI library is a special case. It's a lot easier to keep it simple.
After discussion with @cbergstrum a new approach was decided upon.
This patch achieve the same ends by simply using `LIBCXX_CXX_ABI_LIBRARY_PATH` to specify where to find the library (if the linker won't find it). When this variable is defined it is simply added as a library search path when linking libc++. It is a lot easier to duplicate this behavior in LIT. It also prevents libc++ from being linked with an RPATH.
Reviewers: mclow.lists, cbergstrom, chandlerc, danalbert
Reviewed By: chandlerc, danalbert
Subscribers: chandlerc, cfe-commits
Differential Revision: http://reviews.llvm.org/D5860
llvm-svn: 220157
|
| |
|
|
| |
llvm-svn: 220154
|
| |
|
|
|
|
| |
functionality change
llvm-svn: 220142
|
| |
|
|
|
|
|
|
| |
When libcxx is built in-tree with libcxxabi it links against libcxxabi using
the name of the cmake target and not the actual library name. The cmake target
will not work with `find_library()`, so it needs special case handling.
llvm-svn: 220121
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
linker paths
Summary:
This patch adds support for building/testing libc++ with an ABI library that the linker would not normally find.
- `CMAKE_LIBRARY_PATH` is used to specify the list of search directories.
- The ABI library is now found using `find_library` instead of assuming its along the linker's search path.
- `CMAKE_LIBRARY_PATH` is passed to our LIT config as `library_paths`.
- For each path in `library_paths` the following flags are added `-L<path> -Wl,-rpath -Wl,<path>`
Some changes in existing behavior were also added:
- `target_link_libraries` is now passed the ABI library file instead of the library name. Ex `target_link_libraries(cxx "/usr/lib/libc++abi.so")` vs `target_link_libraries(cxx "c++abi")`.
- `-Wl,-rpath -Wl,<path>` is now used on OSX to link to libc++ instead of env['DYLD_LIBRARY_PATH'] if `use_system_lib=False`.
Reviewers: mclow.lists, danalbert, EricWF
Reviewed By: EricWF
Subscribers: emaste, cfe-commits
Differential Revision: http://reviews.llvm.org/D5038
llvm-svn: 220118
|
| |
|
|
|
|
|
|
| |
Delay instantiation of `__numeric_type` within <cmath>,
don't instantiate it when the `is_arithmetic` conditions do not hold as it causes
errors with user-defined types with ambiguous conversions. Fixes PR21083.
llvm-svn: 219998
|
| |
|
|
|
|
|
| |
LLVM_USE_SANITIZER=Undefined support was added to the LLVM CMake configuration.
Update libc++'s handling of LLVM_USE_SANITIZER to support this as well.
llvm-svn: 219987
|
| |
|
|
| |
llvm-svn: 219898
|
| |
|
|
| |
llvm-svn: 219894
|
| |
|
|
|
|
| |
to Louis Dionne for the bug report and the patch.
llvm-svn: 219785
|
| |
|
|
|
|
| |
specification'. Thanks to Louis Dionne for the fix.
llvm-svn: 219243
|
| |
|
|
|
|
| |
These functions are defined as static in the mingw32 headers.
llvm-svn: 219140
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
With clang, the header atomic requires __has_feature(cxx_atomic), which is only
true in c++11 mode. Because of this, when using modules in c++98 with libc++
compilation of the std module would fail without this change, PR21002.
(With gcc, only gcc4.7+ is needed, no c++11. But gcc doesn't have modules yet,
and the module.modulemap language can't express things like "this is only
required if the compiler is clang". If gcc gets module support, we'd probably
have a module.modulemap file for each compiler that libc++ supports?)
llvm-svn: 218372
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I changed the build so that each ABI header gets its own install rule. This gives us the flexibility to install different headers in different directories.
This also fixes the problem where libstdc++ bits/<header>'s were not being installed under a bits directory.
Test Plan: I tested this patch on linux against libstdc++ and libcxxabi.
Reviewers: danalbert, mclow.lists, jroelofs
Reviewed By: jroelofs
Subscribers: jhunold, cfe-commits
Differential Revision: http://reviews.llvm.org/D5454
llvm-svn: 218309
|
| |
|
|
|
|
| |
non-const references as 'right hand side'. Add tests. Fixes PR# 20836
llvm-svn: 218286
|
| |
|
|
|
|
| |
http://reviews.llvm.org/D5385
llvm-svn: 218144
|
| |
|
|
|
|
| |
that signed and unsigned verstions produce the same sequence.
llvm-svn: 217976
|
| |
|
|
|
|
|
|
| |
GCC 4.9 fails to inline these functions at -O1 because they are used
indirectly. Declare them as inline instead of always_inline. Discussion
in GCC bugreport: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63220
llvm-svn: 217961
|
| |
|
|
| |
llvm-svn: 217938
|
| |
|
|
| |
llvm-svn: 217936
|
| |
|
|
| |
llvm-svn: 217903
|
| |
|
|
|
|
| |
it's called. Add tests to mismatch to make sure it can't be blindsided by such an evil iterator. More tests for other algorithms forthcoming. Thanks to STL for pointing this out at CppCon and Yakov Galka for opening LWG issue #2133
llvm-svn: 217902
|
| |
|
|
|
|
| |
Johnathan Wakeley for the bug report
llvm-svn: 217894
|
| |
|
|
|
|
| |
and suggesting a more correct way to write the first
llvm-svn: 217884
|
| |
|
|
| |
llvm-svn: 217878
|
| |
|
|
| |
llvm-svn: 217877
|
| |
|
|
|
|
| |
construction/assignment should have been marked as deleted. Done. No functionality change, because the base class (base_ios) was marked as non-copyable already.
llvm-svn: 217876
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These calls are allowed to fail spuriously.
29.6.5.25:
Remark: A weak compare-and-exchange operation may fail spuriously.
That is, even when the contents of memory referred to by expected
and object are equal, it may return false and store back to expected
the same memory contents that were originally there. [ Note: This
spurious failure enables implementation of compare and-exchange on a
broader class of machines, e.g., load-locked store-conditional
machines. A consequence of spurious failure is that nearly all uses
of weak compare-and-exchange will be in a loop.
To fix this, we replace any assert() that expects
std::atomic::compare_exchange_weak() to return true with a loop. If the
call does not return true within N runs (with N currently equal to 10),
then the test fails.
http://llvm.org/bugs/show_bug.cgi?id=20546
llvm-svn: 217319
|
| |
|
|
| |
llvm-svn: 217276
|
| |
|
|
|
|
|
|
|
|
| |
If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.
http://reviews.llvm.org/D3969
llvm-svn: 217271
|
| |
|
|
| |
llvm-svn: 217268
|
| |
|
|
|
|
|
|
| |
available_features
http://reviews.llvm.org/D5214
llvm-svn: 217261
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D5165
llvm-svn: 217146
|
| |
|
|
| |
llvm-svn: 217082
|
| |
|
|
|
|
| |
Remove it for now. This flag can be set in build scripts instead.
llvm-svn: 217061
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D5169
llvm-svn: 217038
|
| |
|
|
|
|
|
|
|
|
|
| |
This modifies the use_clang_verify parameter I added in r217009 to
only apply to tests that specifically ask for it via // USE_VERIFY.
This allows us to incrementally convert tests, but start enjoying the
benefits right away.
Suggested by Eric Fiselier in code review.
llvm-svn: 217017
|
| |
|
|
| |
llvm-svn: 217012
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, failure tests work by checking that compilation exits 1.
This can lead to tests that fail for the wrong reason, so it'd be
preferable to convert them to check for specific errors.
This adds use_clang_verify parameter that runs failure tests using
clang's -verify flag. I'll convert some tests in subsequent commits,
and once all of the tests are converted we should key this on whether
cxx_under_test is clang.
I've also converted one of the unique.ptr tests, since it's the one
that motivated the idea of using clang -verify when possible in the
review of r216317.
llvm-svn: 217009
|
| |
|
|
| |
llvm-svn: 217001
|
| |
|
|
| |
llvm-svn: 216999
|
| |
|
|
|
|
|
|
| |
The bug shows up on systems that `#define _POSIX_CLOCK_MONOTONIC 0` to indicate
that users of CLOCK_MONOTONIC must check sysconf at runtime.
See: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html
llvm-svn: 216997
|
| |
|
|
|
|
|
|
|
| |
Fix vector asan annotations with RAII.
Add a test.
Also, remove one dead function.
Review: http://reviews.llvm.org/D4170
llvm-svn: 216995
|
| |
|
|
|
|
| |
This fixes a warning accidentally introduced in r216943.
llvm-svn: 216977
|