| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 322306
|
|
|
|
|
|
| |
involved marking a lot of variables as inline (but only for C++17 and later).
llvm-svn: 321658
|
|
|
|
| |
llvm-svn: 319779
|
|
|
|
| |
llvm-svn: 319736
|
|
|
|
| |
llvm-svn: 319038
|
|
|
|
| |
llvm-svn: 318992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Now implements P0653R2 - Utility to convert to raw pointer.
Reviewers: mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D35470
llvm-svn: 318865
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commit r300140 changed the implementation of compressed_pair, but didn't add
_LIBCPP_INLINE_VISIBILITY to the constructors and get members of the
compressed_pair_elem class. This patch adds the visibility annotation.
I didn't find a way to test this change with libc++ regression tests.
rdar://35352579
Differential Revision: https://reviews.llvm.org/D39751
llvm-svn: 317816
|
|
|
|
|
|
|
|
|
|
|
| |
There were a number of cases where __double_underscore functions,
for example __has_construct_test, were called without being qualified,
causing ADL to occur. This patch qualifies those calls to avoid this
problem.
Thanks to David L. Jones for point out the issue initially.
llvm-svn: 313324
|
|
|
|
| |
llvm-svn: 311283
|
|
|
|
| |
llvm-svn: 305417
|
|
|
|
|
|
| |
casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to make that explicit. No functional change.
llvm-svn: 305397
|
|
|
|
| |
llvm-svn: 304383
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Fixes PR27566.
Differential revision: https://reviews.llvm.org/D30837
llvm-svn: 303874
|
|
|
|
|
|
| |
Richard Smith says that using the namespace results in an ODR violation, but I disagree. Nevertheless, the struct works just as well.
llvm-svn: 302800
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
base break shared_ptr
Summary:
This patch fixes bugs.llvm.org/PR32979.
[util.smartptr.shared.const] says:
> In the constructor definitions below, enables shared_from_this with p, for a pointer p of type Y*, means
> that if Y has an unambiguous and accessible base class that is a specialization of enable_shared_from_-
> this.
This means that libc++ needs to respect the access specifier of the base class, and not attempt to construct
and enabled_shared_from_this base if it is private. However access specifiers don't affect overload resolution
so our current implementation will attempt to construct the private base.
This patch uses SFINAE to correctly detect if the shared_ptr input has an accessible enable_shared_from_this
base class.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D33033
llvm-svn: 302709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libc++ is used as a system library on macOS and iOS (amongst others). In order
for users to be able to compile a binary that is intended to be deployed to an
older version of the platform, clang provides the
availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_
that can be placed on declarations to describe the lifecycle of a symbol in the
library.
See docs/DesignDocs/AvailabilityMarkup.rst for more information.
Differential Revision: https://reviews.llvm.org/D31739
llvm-svn: 302172
|
|
|
|
| |
llvm-svn: 302100
|
|
|
|
| |
llvm-svn: 300510
|
|
|
|
| |
llvm-svn: 300489
|
|
|
|
| |
llvm-svn: 300408
|
|
|
|
| |
llvm-svn: 300407
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch overhauls both specializations of unique_ptr while implementing
the following LWG issues:
* LWG 2801 - This issue constrains unique_ptr's constructors when the deleter type
is not default constructible. Additionally it adds SFINAE conditions
to unique_ptr<T[]>::unique_ptr(Up).
* LWG 2905 - This issue reworks the unique_ptr(pointer, /* see below */ deleter)
constructors so that they correctly SFINAE when the deleter argument cannot
be used to construct the stored deleter.
* LWG 2520 - This issue fixes initializing unique_ptr<T[]> from nullptr.
Libc++ had previously implemented this issue, but the suggested resolution
still broke initialization from NULL. This patch re-works the
unique_ptr<T[]>(Up, deleter) overloads so that they accept NULL as well
as nullptr.
llvm-svn: 300406
|
|
|
|
| |
llvm-svn: 300159
|
|
|
|
|
|
|
| |
This patch fixes a bug where the =default default ctor for
__compressed_pair was incorrect for const qualified types.
llvm-svn: 300152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
times, and add constexpr.
Summary:
__compressed_pair takes and passes it's constructor arguments by value. This causes arguments to be moved 3 times instead of once. This patch addresses that issue and fixes `constexpr` on the constructors.
I would rather have this fix than D27564, and I'm fairly confident it's not ABI breaking but I'm not 100% sure.
I prefer this solution because it removes a lot of code and makes the implementation *much* smaller.
Reviewers: mclow.lists, K-ballo
Reviewed By: K-ballo
Subscribers: K-ballo, cfe-commits
Differential Revision: https://reviews.llvm.org/D27565
llvm-svn: 300140
|
|
|
|
|
|
|
|
|
|
|
| |
For reference deleter types the const qualifier on the return type
of get_deleter() should be ignored, and a non-const deleter should
be returned.
This patch fixes a bug where "const deleter_type&" is incorrectly
formed.
llvm-svn: 300121
|
|
|
|
|
|
| |
This issue missed a couple, so I added those as well (see LWG#2942)
llvm-svn: 299963
|
|
|
|
|
|
| |
functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234
llvm-svn: 298573
|
|
|
|
| |
llvm-svn: 295434
|
|
|
|
|
|
| |
_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
llvm-svn: 292986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Exactly what the title says.
This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it.
See http://wg21.link/P0513R0 for more info.
If there are no comments in the next couple of days I'll commit this
Reviewers: mclow.lists, K-ballo, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28938
llvm-svn: 292684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library.
In order to allow inlining of previously out-of-line functions without an ABI break
libc++ provides legacy definitions in the dylib that old programs can
continue to use. Unfortunatly Windows link.exe detects this hack and diagnoses the duplicate
definitions.
This patch disable the duplicate definitions on Windows by adding an ABI option
which disables all "legacy out-of-line symbols"
llvm-svn: 292190
|
|
|
|
| |
llvm-svn: 292185
|
|
|
|
|
|
|
|
|
|
|
| |
Moves hot functions such as atomic add into the memory header file
so that they can be inlined, which brings performance benefits.
Patch by Kevin Hu, Aditya Kumar, Sebastian Pop
Differential Revision: https://reviews.llvm.org/D24991
llvm-svn: 292184
|
|
|
|
| |
llvm-svn: 291986
|
|
|
|
|
|
| |
like.
llvm-svn: 291580
|
|
|
|
|
|
| |
others used 'element_type *'. Today, they're the same - but soon they won't be. No functional change.
llvm-svn: 291572
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Some parts of the FreeBSD tree are still compiled with C++98, and until
rL288554 this has always worked fine. After that, a complaint about the
newly introduced local _PairT is produced:
/usr/include/c++/v1/memory:3354:27: error: template argument uses local type '_PairT' [-Werror,-Wlocal-type-template-args]
typedef __scalar_hash<_PairT> _HashT;
^~~~~~
/usr/include/c++/v1/memory:3284:29: error: template argument uses local type '_PairT' [-Werror,-Wlocal-type-template-args]
: public unary_function<_Tp, size_t>
^~~
/usr/include/c++/v1/memory:3356:12: note: in instantiation of template class 'std::__1::__scalar_hash<_PairT, 2>' requested here
return _HashT()(__p);
^
As far as I can see, there should be no problem moving the _PairT
struct to just before the __hash_combine() function, which fixes this
particular warning.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits, emaste
Differential Revision: https://reviews.llvm.org/D28472
llvm-svn: 291476
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK.
This patch renames all usages of `__deallocate` internally as to not conflict with the macro.
Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28426
llvm-svn: 291332
|
|
|
|
|
|
|
|
| |
In ABI v1 libc++ implements std::pointer_safety as a class type instead
of an enumeration. However this class type does not provide
a default constructor as it should. This patch adds that default constructor.
llvm-svn: 291059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the C++ standard `std::pointer_safety` is defined
as a C++11 strongly typed enum. However libc++ currently defines
it as a class type which simulates a C++11 enumeration. This
can be detected in valid C++ code.
This patch introduces an the _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE ABI option.
When defined `std::pointer_safety` is implemented as an enum type.
Unfortunatly this also means it can no longer be provided as an extension
in C++03.
Additionally this patch moves the definition for `get_pointer_safety()`
out of the dylib, and into the headers. New usages of `get_pointer_safety()`
will now use the inline version instead of the dylib version. However in
order to keep the dylib ABI compatible the old definition is explicitly
compiled into it.
llvm-svn: 291046
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 290459
|
|
|
|
| |
llvm-svn: 288555
|
|
|
|
| |
llvm-svn: 288554
|
|
|
|
|
|
|
|
| |
libc++ no longer supports C++11 compilers that don't implement `= default`.
This patch removes all instances of the feature test macro
_LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS as well as the potentially dead code it hides.
llvm-svn: 287321
|
|
|
|
|
|
| |
last week in Issaquah
llvm-svn: 286858
|
|
|
|
| |
llvm-svn: 283941
|