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

[libc++] Fix linking for platforms that don't implement std::exception_ptr #79040

Merged

Conversation

itrofimow
Copy link
Contributor

@itrofimow itrofimow commented Jan 22, 2024

This patch fixes linkage for platforms that don't implement std::exception_ptr, as such setup was overlooked in #65534

@itrofimow itrofimow marked this pull request as ready for review January 23, 2024 01:23
@itrofimow itrofimow requested a review from a team as a code owner January 23, 2024 01:23
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 23, 2024

@llvm/pr-subscribers-libcxx

Author: None (itrofimow)

Changes

This patch fixes linkage for platforms that don't implement std::exception_ptr, as such setup was overlooked in #65534


Full diff: https://github.com/llvm/llvm-project/pull/79040.diff

1 Files Affected:

  • (modified) libcxx/src/support/runtime/exception_pointer_unimplemented.ipp (+6)
diff --git a/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp b/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
index de0605d7774b8a6..e12b0caf419d24e 100644
--- a/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
+++ b/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
@@ -30,6 +30,12 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other) noexcept {
   ::abort();
 }
 
+exception_ptr exception_ptr::__from_native_exception_pointer(void *__e) noexcept {
+#warning exception_ptr not yet implemented
+  fprintf(stderr, "exception_ptr not yet implemented\n");
+  ::abort();
+}
+
 nested_exception::nested_exception() noexcept : __ptr_(current_exception()) {}
 
 #if !defined(__GLIBCXX__)

@ldionne ldionne changed the title [libc++] fix linkage for platforms that don't implement std::exception_ptr [libc++] Fix linking for platforms that don't implement std::exception_ptr Jan 23, 2024
@ldionne ldionne merged commit 8c68045 into llvm:main Jan 23, 2024
@nico
Copy link
Contributor

nico commented Jan 25, 2024

Thanks for the fix! My bot now no longer uses this codepath – is upstream missing CI for this config?

@philnik777
Copy link
Contributor

Thanks for the fix! My bot now no longer uses this codepath – is upstream missing CI for this config?

Looks like that's the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants