Skip to content

Commit 2b70b17

Browse files
tstellarllvmbot
authored andcommitted
flang: Fix build with latest libc++ (llvm#127362)
I think this first stopped working with 9548366. This patch fixes the following error: /home/runner/work/llvm-project/llvm-project/flang/runtime/io-api-minimal.cpp:153:11: error: '__libcpp_verbose_abort' is missing exception specification 'noexcept' 153 | void std::__libcpp_verbose_abort(char const *format, ...) { | ^ | noexcept /mnt/build/bin/../include/c++/v1/__verbose_abort:30:28: note: previous declaration is here 30 | __printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...) _LIBCPP_VERBOSE_ABORT_NOEXCEPT; | ^ 1 error generated. (cherry picked from commit 2b340c1)
1 parent 876a5c9 commit 2b70b17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flang/runtime/io-api-minimal.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ bool IODEF(OutputLogical)(Cookie cookie, bool truth) {
150150
// Provide own definition for `std::__libcpp_verbose_abort` to avoid dependency
151151
// on the version provided by libc++.
152152

153-
void std::__libcpp_verbose_abort(char const *format, ...) {
153+
void std::__libcpp_verbose_abort(char const *format, ...) noexcept(
154+
noexcept(std::__libcpp_verbose_abort(""))) {
154155
va_list list;
155156
va_start(list, format);
156157
std::vfprintf(stderr, format, list);

0 commit comments

Comments
 (0)