The straightforward `AddLinkFlag('-lc++experimental')` approach doesn't
work on e.g. MSVC. For linking to libc++ itself, a more convoluted logic
is used (see configure_link_flags_cxx_library).
Differential Revision: https://reviews.llvm.org/D99177
The new layout more closely matches the layout used by other compilers.
This is only used when LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is enabled.
Differential Revision: https://reviews.llvm.org/D100869
Implements parts of:
* P0896R4 The One Ranges Proposal`
Depends on D99873.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D100073
Simplify the test code, and drive-by also test that these algorithms
return the right iterator as their return value.
Differential Revision: https://reviews.llvm.org/D100876
Implements parts of:
* P0896R4 The One Ranges Proposal
Depends on D99855.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D99863
The debug mode tests for map/set's iterators construct empty
containers, making the code after the first increment meaningless.
It's never executed since the tests exit earlier.
It doesn't seem to be intentional, so the patch makes the tests
to construct containers that include at least one element.
Reviewed By: curdeius, Quuxplusone
Differential Revision: https://reviews.llvm.org/D100029
Certain fields of shared ptr have virtual functions and therefore
have their debug info homed in libc++. But if libc++ wasn't built
with debug info, the pretty printer would fail.
This patch makes the pretty printer tolerate such conditions and
updates the test harness.
This patch significantly reworks a previous attempt.
This addresses https://bugs.llvm.org/show_bug.cgi?id=48937
Differential Revision: https://reviews.llvm.org/D100610
Based on D100682 and D99855.
(Note: I originally was going to just make this part of D99855, but I decided not to because this patch moves lots of unrelated code around, and I didn't want to make D99855 harder to review because of unrelated code-changes/moves.)
Differential Revision: https://reviews.llvm.org/D100686
* adds `iterator_traits` specialisation that supports all expected
member aliases except for `pointer`
* adds `iterator_traits` specialisations for iterators that meet the
legacy iterator requirements but might lack multiple member aliases
* makes pointer `iterator_traits` specialisation require objects
Depends on D99854.
Differential Revision: https://reviews.llvm.org/D99855
This continues the work started by @ldionne in 2908eb20ba.
The debug mode tests from
- libcxx/containers/sequences/vector/
- libcxx/strings/basic.string/string.access/
- libcxx/strings/basic.string/string.iterators/
similarly contain two tests in every file making the second test never
run. The patch splits the tests into separate files.
Reviewed By: Quuxplusone, ldionne
Differential Revision: https://reviews.llvm.org/D100592
On Windows, one can't use perms::none on a directory to trigger
failures to read the directory entries.
These remaining tests can't use GetWindowsInaccessibleDir() sensibly,
e.g. for tests that rely on toggling accessibility back and forth during
the test, or where the semantics of the dir provided by
GetWindowsInaccessibleDir() doesn't allow for running the ifdeffed tests
meaningfully.
Differential Revision: https://reviews.llvm.org/D97538
Previously the decision of which library to try to autolink was
based on _DLL, however the _DLL define (which is set by the compiler)
is tied to whether using a dynamically linked CRT or not, and the choice
of dynamic or static CRT is entirely orthogonal to whether libc++ is
linked dynamically or statically.
If _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS isn't defined, then all
declarations are decorated with dllimport, and there's no doubt that
the DLL version of the library is what must be linked.
_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS is defined if building with
LIBCXX_ENABLE_SHARED disabled, and thus the static library is what
should be linked.
If defining _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS manually but wanting
to link against the DLL version of the library, that's not a canonical
configuration, and then it's probably reasonable to manually define
_LIBCPP_NO_AUTO_LINK too, and manually link against the desired
library.
This fixes, among other issues, running tests for the library if
built with LIBCXX_ENABLE_STATIC disabled.
Differential Revision: https://reviews.llvm.org/D100539
Since we have a tool to detect cycles now; and since we're entering
a phase where people can easily introduce cycles by accident (D100682)
or by request (D90999), I think it's increasingly important to shift
the burden of detecting these cycles onto the buildbot instead of
the poor human reviewer.
Also, grep for non-ASCII characters (such as U+200B and U+00AD)
and hard tabs; don't let those get checked in.
Differential Review: https://reviews.llvm.org/D100703
This is the initial patch to implement ranges in libc++.
Implements parts of:
- P0896R4 One Ranges Proposal
- P1870 forwarding-range is too subtle
- LWG3379 in several library names is misleading
Reviewed By: ldionne, #libc, cjdb, zoecarver, Quuxplusone
Differential Revision: https://reviews.llvm.org/D90999
This patch fixes LWG2874. It is based on the original patch by Zoe Carver
originally uploaded at D81417.
Differential Revision: https://reviews.llvm.org/D81417
This is a workaround for PR48937. GDB can sometimes print additional
warnings which currently fails the test. Use re.search instead of
re.match to ignore this additional output.
Differential Revision: https://reviews.llvm.org/D99532
The `iterator_traits` patch became too large for a concise review, so
the "bloat" —as it were— was moved into this patch. Also tests most
C++[98,17] iterator types to confirm backwards compatibility is
successful (regex iterators are intentionally not present, but directory
iterators are due to a peculiar error encountered while patching
`iterator_traits`).
Depends on D99461.
Differential Revision: https://reviews.llvm.org/D99854
Implements parts of:
* P0896R4 The One Ranges Proposal
* LWG3446 `indirectly_readable_traits` ambiguity for types with both `value_type` and `element_type`
Depends on D99141.
Differential Revision: https://reviews.llvm.org/D99461
In 5fd17ab, we worked around the Apple system headers not providing
const-correct overloads for some <string.h> functions. However, that
required an attribute that was only present in recent Clangs at the
time. We can now assume that all supported Clang versions on Apple
platforms do support that attribute.
Differential Revision: https://reviews.llvm.org/D100477
This makes it clear that headers like <memory> which include auto_ptr
only do that when compiling under an older Standard, or when the removed
feature is explicitly requested.
Some of Microsoft's unit tests in D70631 fail because libc++'s
implementation of std::chars_format isn't a proper bitmask type. Adding
the required functions to make std::chars_format a proper bitmask type.
Implements parts of P0067: Elementary string conversions
Differential Revision: https://reviews.llvm.org/D97115
The added documents have two tables: 1 containing links to issues and papers related to ranges. And the other contains most of the sections from the One Ranges Proposal, with their dependencies linked. This will allow us to assign work that can be done in parallel.
Differential Revision: https://reviews.llvm.org/D100393