diff options
author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2015-11-10 11:41:22 +0000 |
---|---|---|
committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2015-11-10 11:41:22 +0000 |
commit | f520c1445f2d9cfb6153e3c125076aa6e3a76fc8 (patch) | |
tree | 51af3efa51e0deed70331a4519a23247fe709fe0 /libcxx/src | |
parent | d414c99b9c20e2ff96524c015699f6bc6f71a888 (diff) | |
download | bcm5719-llvm-f520c1445f2d9cfb6153e3c125076aa6e3a76fc8.tar.gz bcm5719-llvm-f520c1445f2d9cfb6153e3c125076aa6e3a76fc8.zip |
Make it possible to build a no-exceptions variant of libcxx.
Fixes a small omission in libcxx that prevents libcxx being built when
-DLIBCXX_ENABLE_EXCEPTIONS=0 is specified.
This patch adds XFAILS to all those tests that are currently failing
on the new -fno-exceptions library variant. Follow-up patches will
update the tests (progressively) to cope with the new library variant.
Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a
llvm-svn: 252598
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/future.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/src/future.cpp b/libcxx/src/future.cpp index 3132b1861af..e1758f39df3 100644 --- a/libcxx/src/future.cpp +++ b/libcxx/src/future.cpp @@ -221,10 +221,12 @@ promise<void>::~promise() { if (__state_) { +#ifndef _LIBCPP_NO_EXCEPTIONS if (!__state_->__has_value() && __state_->use_count() > 1) __state_->set_exception(make_exception_ptr( future_error(make_error_code(future_errc::broken_promise)) )); +#endif // _LIBCPP_NO_EXCEPTIONS __state_->__release_shared(); } } |