| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 241067
|
|
|
|
|
|
| |
including libc++ header files. This is so that the dylib gets built with our headers; rather than the system-installed ones. We do this in most places already, just fixing a couple of inconsistent uses.
llvm-svn: 240412
|
|
|
|
|
|
|
|
| |
Within the shared state methods do not unlock the lock guards manually. This
could cause a race condition where the shared state is destroyed before the
method is complete.
llvm-svn: 239577
|
|
|
|
| |
llvm-svn: 239160
|
|
|
|
|
|
| |
uncaught_exceptions()
llvm-svn: 238879
|
|
|
|
|
|
| |
when available
llvm-svn: 238846
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes in src/exception.cpp and cmake/Modules/HandleLibCXXABI.cmake fix a
bug when building libc++ with GCC. Because GCC does not support __has_include
we need to explicitly tell it that we are building against libc++abi via the
preprocessor definition `LIBCXX_BUILDING_LIBCXXABI`.
The changes in include/ratio are to work around CWG defect
1712 (constexpr variable template declarations). GCC 4.8 and before has not
adopted the resolution to this defect.
The changes in include/exception work around an issue where is_final is used
without it being defined in type_traits.
llvm-svn: 237767
|
|
|
|
| |
llvm-svn: 237592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The system_clock::now() function currently uses gettimeofday(). The
problem with gettimeofday() is that it is an obsolete XSI function,
hence unavailable on CloudABI. See:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html
Change this code to use clock_gettime() with CLOCK_REALTIME instead,
which is more consistent, as clock_gettime() is already used for
steady_clock.
A previous version of this change actually attempted to change
system_clock::duration, but I reverted this part as it breaks the
existing ABI.
Differential Revision: http://reviews.llvm.org/D8253
Approved by: jroelofs
llvm-svn: 237390
|
|
|
|
| |
llvm-svn: 236265
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea behind Nuxi CloudABI is that it is targeted at (but not limited to)
running networked services in a sandboxed environment. The model behind stdin,
stdout and stderr is strongly focused on interactive tools in a command shell.
CloudABI does not support the notion of stdin and stdout, as 'standard
input/output' does not apply to services. The concept of stderr does makes
sense though, as services do need some mechanism to log error messages in a
uniform way.
This patch extends libc++ in such a way that std::cin and std::cout and the
associated <cstdio>/<cwchar> functions can be disabled through the flags
_LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time
it attempts to clean up src/iostream.cpp a bit. Instead of using a single array
of mbstate_t objects and hardcoding the array indices, it creates separate
objects that declared next to the iostream objects and their buffers. The code
is also restructured by interleaving the construction and setup of c* and wc*
objects. That way it is more obvious that this is done identically.
The c* and wc* objects already have separate unit tests. Make use of this fact
by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in
both directions. If stdin or stdout is disabled, these tests will therefore
test for the absence of c* and wc*.
Differential Revision: http://reviews.llvm.org/D8340
llvm-svn: 233275
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we want to add support for making std::cin and std::cout optional, it
is impractical to have all of the mbstate_t objects in one array. This
would mean that if std::cin and std::cout are omitted, the state_types
array is only used partially.
Solve this by using separate global variables. These are placed right
next to the iostream object and the buffer, meaning we can easily #ifdef
them away.
Differential Revision: http://reviews.llvm.org/D8359
llvm-svn: 233274
|
|
|
|
|
|
| |
the bug open because (1) I'm not sure that we're correct here, only better than before, and (2) no tests
llvm-svn: 233012
|
|
|
|
| |
llvm-svn: 232703
|
|
|
|
|
|
|
|
|
|
|
|
| |
Interleave the code for narrow and wide character streams. This makes it
more obvious that the two pieces of code are identical. Furthermore, it
makes it easier to conditionally compile support for certain streams, as
less #ifdef blocks are needed.
Differential Revision: http://reviews.llvm.org/D8342
Reviewed by: marshall
llvm-svn: 232516
|
|
|
|
|
|
|
|
|
| |
Solaris apparently doesn't have iswblank_l.
Thanks to C Bergstrom for the report!
llvm-svn: 232172
|
|
|
|
|
|
|
|
|
| |
This basically reverts the revert in r216508, and fixes a few more cases while
I'm at it. Reading my commit message on that commit again, I think it's bupkis.
http://reviews.llvm.org/D8237
llvm-svn: 231940
|
|
|
|
| |
llvm-svn: 231897
|
|
|
|
|
|
|
| |
As CloudABI does not provide sysctl(), this header is not present. Make
thread.cpp build correctly (and pass all tests) by not including the header.
llvm-svn: 231768
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a couple of places where libc++ prints log/error messages to
stdout on its own. This may of course interfere with the output
generated with applications. Log/error messages should be directed to
stderr instead.
Differential Revision: http://reviews.llvm.org/D8135
Reviewed by: marshall
llvm-svn: 231767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nuxi CloudABI (https://github.com/NuxiNL/cloudlibc) does not allow
processes to access the global filesystem namespace. This breaks
random_device, as it attempts to use /dev/{u,}random. This change adds
support for arc4random(), which is present on CloudABI.
In my opinion it would also make sense to use arc4random() on other
operating systems, such as *BSD and Mac OS X, but I'd rather leave that
to the maintainers of the respective platforms. Switching to
arc4random() does change the ABI.
This change also attempts to make some cleanups to the code. It adds a
single #define for every random interface, instead of testing against
operating systems explicitly.
As discussed, also validate the token argument to be equal to
"/dev/urandom" on all systems that only provide pseudo-random numbers.
This should cause little to no breakage, as "/dev/urandom" is also the
default argument value.
Reviewed by: jfb
Differential Revision: http://reviews.llvm.org/D8134
llvm-svn: 231764
|
|
|
|
|
|
| |
_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
llvm-svn: 231255
|
|
|
|
|
|
| |
expectation is that some targets (Android, cough) will enable it. Note that this is an implementation detail, not an interface change.
llvm-svn: 231252
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Newlib supports ctype differently from other platforms, this patch teaches libc++ about yet another platform that does ctype differently.
Reviewers: jroelofs
Subscribers: cfe-commits, danalbert, EricWF, jvoung, jfb, mclow.lists
Differential Revision: http://reviews.llvm.org/D7888
llvm-svn: 230557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
GCC emits a pretty amusing warning when there are apostrophes in a #warning:
```warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]```
Reword the warning to avoid this, and be more consistent with other warnings in libc++.
Reviewers: danalbert
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7818
llvm-svn: 230298
|
|
|
|
|
|
| |
r229281, this adds version guards and test cases.
llvm-svn: 229968
|
|
|
|
|
|
| |
implicitly defined by clang, as of r229241.
llvm-svn: 229281
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: jvoung
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7416
llvm-svn: 228183
|
|
|
|
| |
llvm-svn: 226947
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: K-ballo, mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: jfb, jroelofs, majnemer, cfe-commits
Differential Revision: http://reviews.llvm.org/D6558
llvm-svn: 225273
|
|
|
|
|
|
| |
LIBCXX_ENABLE_RTTI are turned off.
llvm-svn: 224095
|
|
|
|
|
|
| |
bad_optional_access to match the Library Fundamentals draft standard. This is not all of the upcoming changes to optional, though.
llvm-svn: 223775
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: NaCl shouldn't include sysctl.h when trying to determine std::thread::hardware_concurrency, it should instead use sysconf(_SC_NPROCESSORS_ONLN) through unistd.h. No test needs to be changed, since hardware_concurrency.pass.cpp already tests that std::thread::hardware_concurrency > 0.
Test Plan: make check-libcxx
Reviewers: dschuff, danalbert
Subscribers: jfb, cfe-commits
Differential Revision: http://reviews.llvm.org/D6470
llvm-svn: 223128
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The NaCl sandbox doesn't allow opening files under /dev, but it offers an API which provides the same capabilities. This is the same random device emulation that nacl_io performs for POSIX support, but nacl_io is an optional library so libc++ can't assume that device emulation will be performed. Note that NaCl only supports /dev/urandom, not /dev/random.
This patch also cleans up some of the preprocessor #endif, and fixes the test for Win32 (it accepts any token, and would therefore never throw regardless of the token provided).
Test Plan: ninja check-libcxx
Reviewers: dschuff, mclow.lists, danalbert
Subscribers: jfb, cfe-commits
Differential Revision: http://reviews.llvm.org/D6442
llvm-svn: 223068
|
|
|
|
| |
llvm-svn: 222794
|
|
|
|
|
|
|
|
| |
Since the initialization of the pointer happens across the libc library boundry
MSAN will not know the pointer was initialized. This fixes MSAN failures in
test/strings/string.conversions.
llvm-svn: 222052
|
|
|
|
| |
llvm-svn: 221029
|
|
|
|
|
|
| |
conditional compilation block
llvm-svn: 221025
|
|
|
|
|
|
| |
multiple defines. Patch from Baptiste Daroussin.
llvm-svn: 220882
|
|
|
|
|
|
| |
poo-poohed it, and was wrong. Fix the call in <locale>. Review the others, refactored some duplicated code, and found overflow bugs (and __event_cap_ was never getting updated, either).
llvm-svn: 220702
|
|
|
|
| |
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: 216999
|
|
|
|
|
|
| |
http://reviews.llvm.org/D4045
llvm-svn: 216949
|
|
|
|
| |
llvm-svn: 216943
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After discussing implementing more tests for this with @danalbert & @mclow, I
realized this change is not correct.
The C++ standard requires do_is() to behave as if it were a loop that checked
is(). Furthermore, it requires is() to check "The first form returns the result
of the expression (M & m) != 0; i.e., true if the character has the
characteristics specified"... which the reverted patch definitely does not
conform to. Even further, furthermore, this requires that ctype's mask be an
actual bitmask, unlike what android and newlib provide for _ctype_.
Fixing the original bug that instigated this patch remains TBD.
llvm-svn: 216508
|
|
|
|
|
|
|
| |
This patch: http://reviews.llvm.org/D5081
Original patch: http://reviews.llvm.org/D5071 (from @danalbert)
llvm-svn: 216497
|
|
|
|
|
|
|
|
|
|
|
| |
Turning off explicit template instantiation leads to a pretty
significant build time and code size cost. We're better off dealing
with ABI incompatibility issues that come up in a less heavy handed
way.
This reverts commit r189610.
llvm-svn: 215740
|
|
|
|
|
|
|
| |
Keeping the regex code sane is much easier if we match the other
platforms and use an unsigned mask.
llvm-svn: 214442
|
|
|
|
|
|
|
|
|
|
|
|
| |
__get_classname() and __bracket_expression were assuming that
char_class_type was ctype_base::mask rather than using
regex_traits<_CharT>::char_class_type.
This change allows char_class_type to be defined to something other than
ctype_base::mask so that the implementation will still work for
platforms with an 8-bit ctype mask (such as Android and OpenBSD).
llvm-svn: 214201
|