Skip to content

Commit a612005

Browse files
address CRs
1 parent 11323ef commit a612005

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

libc/include/llvm-libc-types/jmp_buf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_TYPES_JMP_BUF_H
1010
#define LLVM_LIBC_TYPES_JMP_BUF_H
1111

12-
#include "llvm-libc-types/sigset_t.h"
12+
#include "sigset_t.h"
1313

1414
typedef struct {
1515
#ifdef __x86_64__

libc/src/setjmp/linux/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ add_object_library(
44
../sigsetjmp_epilogue.h
55
SRCS
66
sigsetjmp_epilogue.cpp
7+
COMPILE_OPTIONS
8+
${libc_opt_high_flag}
9+
-fomit-frame-pointer
710
DEPENDS
811
libc.src.__support.common
912
libc.src.__support.OSUtil.osutil
1013
libc.hdr.types.jmp_buf
1114
libc.hdr.types.sigset_t
12-
COMPILE_OPTIONS
13-
${libc_opt_high_flag}
14-
-fomit-frame-pointer
1515
)

libc/src/setjmp/setjmp_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace LIBC_NAMESPACE_DECL {
2929
#ifdef LIBC_COMPILER_IS_GCC
3030
[[gnu::nothrow]]
3131
#endif
32-
__attribute__((returns_twice)) int setjmp(jmp_buf buf);
32+
[[gnu::returns_twice]] int setjmp(jmp_buf buf);
3333

3434
} // namespace LIBC_NAMESPACE_DECL
3535

libc/src/setjmp/sigsetjmp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace LIBC_NAMESPACE_DECL {
1818
#ifdef LIBC_COMPILER_IS_GCC
1919
[[gnu::nothrow]]
2020
#endif
21-
__attribute__((returns_twice)) int sigsetjmp(sigjmp_buf buf, int savesigs);
21+
[[gnu::returns_twice]] int sigsetjmp(sigjmp_buf buf, int savesigs);
2222

2323
} // namespace LIBC_NAMESPACE_DECL
2424

libc/src/setjmp/x86_64/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ add_entrypoint_object(
44
setjmp.cpp
55
HDRS
66
../setjmp_impl.h
7-
DEPENDS
8-
libc.hdr.types.jmp_buf
97
COMPILE_OPTIONS
108
${libc_opt_high_flag}
9+
-fomit-frame-pointer
10+
DEPENDS
11+
libc.hdr.types.jmp_buf
1112
)
1213

1314
add_entrypoint_object(
@@ -16,13 +17,13 @@ add_entrypoint_object(
1617
sigsetjmp.cpp
1718
HDRS
1819
../sigsetjmp.h
20+
COMPILE_OPTIONS
21+
${libc_opt_high_flag}
1922
DEPENDS
2023
libc.hdr.types.jmp_buf
2124
libc.hdr.types.sigset_t
2225
libc.src.setjmp.sigsetjmp_epilogue
2326
libc.src.setjmp.setjmp
24-
COMPILE_OPTIONS
25-
${libc_opt_high_flag}
2627
)
2728

2829
add_entrypoint_object(
@@ -31,9 +32,9 @@ add_entrypoint_object(
3132
longjmp.cpp
3233
HDRS
3334
../longjmp.h
34-
DEPENDS
35-
libc.hdr.types.jmp_buf
3635
COMPILE_OPTIONS
3736
${libc_opt_high_flag}
3837
-fomit-frame-pointer
38+
DEPENDS
39+
libc.hdr.types.jmp_buf
3940
)

libc/src/setjmp/x86_64/sigsetjmp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf buf)) {
4141
jmp %P[setjmp])" ::[retaddr] "i"(offsetof(__jmp_buf, sig_retaddr)),
4242
[extra] "i"(offsetof(__jmp_buf, sig_extra)), [setjmp] "i"(setjmp),
4343
[epilogue] "i"(sigsetjmp_epilogue)
44-
: "rax", "rbx");
44+
: "eax", "ebx", "ecx");
4545
}
4646
#endif
4747
[[gnu::naked]]

0 commit comments

Comments
 (0)