Add a couple of _LIBCPP_ASSERT calls. No functional change.

llvm-svn: 269663
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 0e1c6c7ed1a4a21495a35950f5599a6dcd7b150e
diff --git a/include/future b/include/future
index ce15eaf..957a23c 100644
--- a/include/future
+++ b/include/future
@@ -1482,6 +1482,7 @@
 void
 promise<_Rp>::set_exception(exception_ptr __p)
 {
+    _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
     __state_->set_exception(__p);
@@ -1629,6 +1630,7 @@
 void
 promise<_Rp&>::set_exception(exception_ptr __p)
 {
+    _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
     __state_->set_exception(__p);