Skip to content

Commit c908ee0

Browse files
committed
[libc] Add _Returns_twice to C++ code
Fixes issue with <csetjmp> which requires _Returns_twice but in C++ mode
1 parent c39b1ae commit c908ee0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libc/include/__llvm-libc-common.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
#define __NOEXCEPT throw()
4848
#endif
4949

50+
#undef _Returns_twice
51+
#define _Returns_twice [[gnu::returns_twice]]
52+
5053
// This macro serves as a generic cast implementation for use in both C and C++,
5154
// similar to `__BIONIC_CAST` in Android.
5255
#undef __LLVM_LIBC_CAST

0 commit comments

Comments
 (0)