Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation issues with clang without msvc linker #1460

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions strings/base_coroutine_foundation.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ namespace winrt::impl
if (m_status.load(std::memory_order_relaxed) == AsyncStatus::Started)
{
m_status.store(AsyncStatus::Canceled, std::memory_order_relaxed);
#ifndef _LIBCPP_ABI_MICROSOFT
m_exception = std::make_exception_ptr(hresult_canceled());
#endif
cancel = std::move(m_cancel);
}
}
Expand Down Expand Up @@ -605,6 +607,9 @@ namespace winrt::impl

void unhandled_exception() noexcept
{
#ifdef _LIBCPP_ABI_MICROSOFT
::std::abort();
#else
slim_lock_guard const guard(m_lock);
WINRT_ASSERT(m_status.load(std::memory_order_relaxed) == AsyncStatus::Started || m_status.load(std::memory_order_relaxed) == AsyncStatus::Canceled);
m_exception = std::current_exception();
Expand All @@ -621,6 +626,7 @@ namespace winrt::impl
{
m_status.store(AsyncStatus::Error, std::memory_order_relaxed);
}
#endif
}

template <typename Expression>
Expand Down Expand Up @@ -678,7 +684,9 @@ namespace winrt::impl
}
}

#ifndef _LIBCPP_ABI_MICROSOFT
std::exception_ptr m_exception{};
#endif
slim_mutex m_lock;
async_completed_handler_t<AsyncInterface> m_completed;
winrt::delegate<> m_cancel;
Expand Down
Loading