| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In a bunch of places, we used to check whether LIBCXX_BUILDING_LIBCXXABI
is defined OR we're building for an Apple platform. This used to
be necessary in a time when Apple's build script did NOT define
LIBCXX_BUILDING_LIBCXXABI. However this is not relevant anymore
since Apple's build does define LIBCXX_BUILDING_LIBCXXABI.
Reviewers: EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60842
llvm-svn: 358988
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351648
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch replaces __sync_* with __libcpp_atomic_* and adds a wrapper
function for __atomic_exchange to support _LIBCPP_HAS_NO_THREADS.
Reviewers: EricWF, jroelofs, mclow.lists, compnerd
Reviewed By: EricWF, compnerd
Subscribers: compnerd, efriedma, cfe-commits, joerg, llvm-commits
Differential Revision: https://reviews.llvm.org/D35235
llvm-svn: 313694
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC.
The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well.
Note there are still 2 outstanding exception_ptr/nested_exception test failures.
* `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time.
* `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion.
This patch also gets most of the `<future>` tests passing as well.
Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D32927
llvm-svn: 302393
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
files for different runtimes."
This recommits r294707 with additional fixes. The main difference is
libc++ now correctly builds without any ABI library.
exception.cpp is a bloody mess. It's full of confusing #ifdef branches for
each different ABI library we support, and it's getting unmaintainable.
This patch breaks down exception.cpp into multiple different header files,
roughly one per implementation. Additionally it moves the definitions of
exceptions in new.cpp into the correct implementation header.
This patch also removes an unmaintained libc++abi configuration.
This configuration may still be used by Apple internally but there
are no other possible users. If it turns out that Apple still uses
this configuration internally I will re-add it in a later commit.
See http://llvm.org/PR31904.
llvm-svn: 294730
|
|
|
|
|
|
|
|
| |
for different runtimes."
The compiler-rt CMake configuration needs some tweaking before this can land.
llvm-svn: 294727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
different runtimes.
exception.cpp is a bloody mess. It's full of confusing #ifdef branches for
each different ABI library we support, and it's getting unmaintainable.
This patch breaks down exception.cpp into multiple different header files,
roughly one per implementation. Additionally it moves the definitions of
exceptions in new.cpp into the correct implementation header.
This patch also removes an unmaintained libc++abi configuration.
This configuration may still be used by Apple internally but there
are no other possible users. If it turns out that Apple still uses
this configuration internally I will re-add it in a later commit.
See http://llvm.org/PR31904.
llvm-svn: 294707
|
|
|
|
|
|
|
|
|
| |
Replace preprocess conditions of defined(_MSC_VER) &&
!defined(__clang__) with defined(_LIBCPP_MSVC). NFC.
Patch by Dave Lee!
llvm-svn: 294171
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows
Summary:
This patch implements the following functions on Windows by forwarding to the MSVCRT:
* `get_terminate()`
* `set_terminate()`
* `terminate()`
* `set_unexpected()`
* `get_unexpected()`
* `unexpected()`
* `uncaught_exception()`
* `uncaught_exceptions()`
Reviewers: compnerd, rnk, majnemer, smeenai
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28442
llvm-svn: 291343
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch re-commits a previous attempt to support building libc++ w/o
an ABI library. That patch was originally reverted because:
1) It forgot to teach the test suite about "default" ABI libraries.
2) Some LLVM builders don't clear the CMake cache between builds. The previous
patch caused those builders to fail since their old cache entry for
LIBCXX_CXX_ABI="" is no longer valid.
The updated patch addresses both issues. It works around (2) by adding
a hack to force the builders to update their cache entries. The hack will
be removed shortly once all LLVM builders have run.
Original commit message
-----------------------
Typically libc++ uses libc++abi or libcxxrt to provide the ABI and runtime bits
of the C++ STL. However we also support building w/o an ABI library entirely.
This patch fixes building libc++ w/o an ABI library (and incorporates the
`~type_info()` fix in D28211).
The main changes in this patch are:
1) Add `-DLIBCXX_CXX_ABI=default` instead of using the empty string to mean "default".
2) Fix CMake bits which treated "none" as "default" on OS X.
3) Teach the source files to respect `-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY`.
4) Define ~type_info() when _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY is defined.
Unfortunately this patch doesn't help clean up the macro mess that we use to
configure for different ABI libraries.
llvm-svn: 290849
|
|
|
|
| |
llvm-svn: 290841
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typically libc++ uses libc++abi or libcxxrt to provide the ABI and runtime bits
of the C++ STL. However we also support building w/o an ABI library entirely.
This patch fixes building libc++ w/o an ABI library (and incorporates the
`~type_info()` fix in D28211).
The main changes in this patch are:
1) Add `-DLIBCXX_CXX_ABI=default` instead of using the empty string to mean "default".
2) Fix CMake bits which treated "none" as "default" on OS X.
3) Teach the source files to respect `-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY`.
4) Define ~type_info() when _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY is defined.
Unfortunately this patch doesn't help clean up the macro mess that we use to
configure for different ABI libraries.
llvm-svn: 290839
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch applies the _LIBCPP_SAFE_STATIC attribute to internal globals,
most of which are locking primitives, in order to ensure that they can
safely be used during program startup.
This patch also fixes an unsafe static init issue with the global locks
used to implement atomic operations on shared pointers. Previously the
locks were initialized using a dynamically initialized pointer, so it was
possible that the pointer was uninitialized.
llvm-svn: 282640
|
|
|
|
|
|
|
|
|
| |
This was put in to get libc++ building without libcxxabi. We now have
macros that show that we are building against libcxxabi so use that
instead. This guards against existing but broken cxxabi.h headers on the
system.
llvm-svn: 250507
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 221029
|
|
|
|
|
|
| |
__EMSCRIPTEN__. If you're not using the PP symbol EMSCRIPTEN, then you should see no functionality change.
llvm-svn: 195136
|
|
|
|
|
|
| |
change. PR17843
llvm-svn: 194432
|
|
|
|
|
|
|
| |
Rather than try to protect the function behind a precise,
ever-changing #if expression, just inline it into every caller.
llvm-svn: 192077
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libsupc++ does not implement the dependent EH ABI and the
functionality it uses to implement std::exception_ptr (which it
declares as an alias of std::__exception_ptr::exception_ptr) is not
directly exported to clients. So we have little choice but to hijack
std::__exception_ptr::exception_ptr's (which fortunately has the
same layout as our std::exception_ptr) copy constructor, assignment
operator and destructor (which are part of its stable ABI), and its
rethrow_exception(std::__exception_ptr::exception_ptr) function.
Also, remove some out of date comments.
Differential Revision: http://llvm-reviews.chandlerc.com/D1826
llvm-svn: 192076
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The remaining multiple definitions were flushed out by attempting to
link libsupc++ and libc++ into the same executable with --whole-archive,
e.g.
clang++ -I../llvm/projects/libcxx/include -nodefaultlibs -Wl,--whole-archive lib/libc++.a /usr/lib/gcc/x86_64-linux-gnu/4.6/libsupc++.a -Wl,--no-whole-archive -lgcc -lgcc_s -lc -lpthread -lrt
(The same technique was used to flush out multiple definitions in
libstdc++.)
Differential Revision: http://llvm-reviews.chandlerc.com/D1824
llvm-svn: 192074
|
|
|
|
|
|
| |
that compiler doesn't support #warning.
llvm-svn: 191980
|
|
|
|
| |
llvm-svn: 186951
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=15624.
llvm-svn: 178354
|
|
|
|
| |
llvm-svn: 177297
|
|
|
|
|
|
|
|
|
| |
but not used when
building against libsupc++ as the functions for which they are used are provided
by libsupc++. Simply preprocess them away when building against libsupc++.
llvm-svn: 173165
|
|
|
|
| |
llvm-svn: 169036
|
|
|
|
|
|
| |
platform-provided macro on some systems) to _LIBCPP_NORETURN.
llvm-svn: 160773
|
|
|
|
| |
llvm-svn: 160038
|
|
|
|
| |
llvm-svn: 152718
|
|
|
|
|
|
| |
unsure what the change was trying to do, but it didn't do the right thing for __APPLE__. So instead of trying to guess what was intended, I'm just putting it back the way it was.
llvm-svn: 151727
|
|
|
|
| |
llvm-svn: 151717
|
|
|
|
| |
llvm-svn: 149701
|
|
|
|
| |
llvm-svn: 149634
|
|
|
|
| |
llvm-svn: 140253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libc++ now mostly works on FreeBSD with libcxxrt and this patch applied to the base system:
http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110920/e666632c/xlocale-0001.obj
Summary of tests on FreeBSD:
****************************************************
Results for /root/libcxx/test:
using FreeBSD clang version 3.0 (trunk 135360) 20110717
Target: x86_64-unknown-freebsd9.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -I/root/libcxx/include -L/root/libcxx/build/lib
----------------------------------------------------
sections without tests : 1
sections with failures : 48
sections without failures: 1015
+ ----
total number of sections : 1064
----------------------------------------------------
number of tests failed : 145
number of tests passed : 4179
+ ----
total number of tests : 4324
****************************************************
(Many due to this clang version not supporting C++ atomics)
More fixes to follow...
llvm-svn: 140245
|
|
|
|
| |
llvm-svn: 136526
|
|
|
|
| |
llvm-svn: 132129
|
|
|
|
| |
llvm-svn: 132125
|
|
|
|
| |
llvm-svn: 121002
|
|
|
|
| |
llvm-svn: 120914
|
|
|
|
| |
llvm-svn: 120712
|
|
|
|
| |
llvm-svn: 119395
|
|
|
|
| |
llvm-svn: 111778
|
|
|
|
| |
llvm-svn: 111751
|
|
|
|
| |
llvm-svn: 110828
|
|
|
|
| |
llvm-svn: 104850
|