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

[libcxxabi] Add a missing include for abort() #126865

Merged
merged 2 commits into from
Feb 12, 2025
Merged

Conversation

atetubou
Copy link
Contributor

This is to fix a build error when we use Clang modules in Chromium.

@atetubou atetubou requested a review from a team as a code owner February 12, 2025 07:11
@llvmbot llvmbot added the libc++abi libc++abi C++ Runtime Library. Not libc++. label Feb 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 12, 2025

@llvm/pr-subscribers-libcxxabi

Author: Takuto Ikuta (atetubou)

Changes

This is to fix a build error when we use Clang modules in Chromium.


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

1 Files Affected:

  • (modified) libcxxabi/src/cxa_default_handlers.cpp (+1)
diff --git a/libcxxabi/src/cxa_default_handlers.cpp b/libcxxabi/src/cxa_default_handlers.cpp
index b029982ea87c3..c48563bd44706 100644
--- a/libcxxabi/src/cxa_default_handlers.cpp
+++ b/libcxxabi/src/cxa_default_handlers.cpp
@@ -9,6 +9,7 @@
 // new_handler.
 //===----------------------------------------------------------------------===//
 
+#include <cstdlib>
 #include <exception>
 #include <new>
 #include "abort_message.h"

Copy link
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I used std::abort instead because <cstdlib> is not technically required to provide ::abort.

@ldionne ldionne merged commit 75dd411 into llvm:main Feb 12, 2025
11 of 16 checks passed
@atetubou atetubou deleted the patch-1 branch February 13, 2025 07:47
flovent pushed a commit to flovent/llvm-project that referenced this pull request Feb 13, 2025
This is to fix a build error when we use Clang modules in Chromium.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++abi libc++abi C++ Runtime Library. Not libc++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants