File tree 19 files changed +8
-414
lines changed
19 files changed +8
-414
lines changed Original file line number Diff line number Diff line change @@ -1049,8 +1049,6 @@ if(LLVM_LIBC_FULL_BUILD)
1049
1049
# setjmp.h entrypoints
1050
1050
libc.src.setjmp.longjmp
1051
1051
libc.src.setjmp.setjmp
1052
- libc.src.setjmp.siglongjmp
1053
- libc.src.setjmp.sigsetjmp
1054
1052
1055
1053
# stdio.h entrypoints
1056
1054
libc.src.stdio.clearerr
Original file line number Diff line number Diff line change @@ -223,14 +223,5 @@ add_proxy_header_library(
223
223
libc.include .wchar
224
224
)
225
225
226
- # offsetof is a macro inside compiler resource header stddef.h
227
- add_proxy_header_library(
228
- offsetof_macros
229
- HDRS
230
- offsetof_macros.h
231
- FULL_BUILD_DEPENDS
232
- libc.include .llvm-libc-macros .offsetof_macro
233
- )
234
-
235
226
add_subdirectory (types)
236
227
add_subdirectory (func)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ add_header(gid_t HDR gid_t.h)
39
39
add_header(uid_t HDR uid_t.h)
40
40
add_header(imaxdiv_t HDR imaxdiv_t.h)
41
41
add_header(ino_t HDR ino_t.h)
42
+ add_header(jmp_buf HDR jmp_buf.h)
42
43
add_header(mbstate_t HDR mbstate_t.h)
43
44
add_header(mode_t HDR mode_t.h)
44
45
add_header(mtx_t HDR mtx_t.h DEPENDS .__futex_word .__mutex_type)
@@ -82,7 +83,6 @@ add_header(union_sigval HDR union_sigval.h)
82
83
add_header(siginfo_t HDR siginfo_t.h DEPENDS .union_sigval .pid_t .uid_t .clock_t)
83
84
add_header(sig_atomic_t HDR sig_atomic_t.h)
84
85
add_header(sigset_t HDR sigset_t.h DEPENDS libc.include .llvm-libc-macros .signal_macros)
85
- add_header(jmp_buf HDR jmp_buf.h DEPENDS .sigset_t)
86
86
add_header(struct_sigaction HDR struct_sigaction.h DEPENDS .sigset_t .siginfo_t)
87
87
add_header(struct_timespec HDR struct_timespec.h DEPENDS .time_t)
88
88
add_header(
Original file line number Diff line number Diff line change 9
9
#ifndef LLVM_LIBC_TYPES_JMP_BUF_H
10
10
#define LLVM_LIBC_TYPES_JMP_BUF_H
11
11
12
- #include "sigset_t.h"
13
-
14
12
typedef struct {
15
13
#ifdef __x86_64__
16
14
__UINT64_TYPE__ rbx ;
@@ -51,22 +49,9 @@ typedef struct {
51
49
#endif
52
50
#else
53
51
#error "__jmp_buf not available for your target architecture."
54
- #endif
55
- // TODO: implement sigjmp_buf related functions for other architectures
56
- // Issue: https://github.com/llvm/llvm-project/issues/136358
57
- #if defined(__i386__ ) || defined(__x86_64__ )
58
- // return address
59
- void * sig_retaddr ;
60
- // extra register buffer to avoid indefinite stack growth in sigsetjmp
61
- void * sig_extra ;
62
- // signal masks
63
- sigset_t sigmask ;
64
52
#endif
65
53
} __jmp_buf ;
66
54
67
55
typedef __jmp_buf jmp_buf [1 ];
68
56
69
- #if defined(__i386__ ) || defined(__x86_64__ )
70
- typedef __jmp_buf sigjmp_buf [1 ];
71
- #endif
72
57
#endif // LLVM_LIBC_TYPES_JMP_BUF_H
Original file line number Diff line number Diff line change @@ -21,19 +21,3 @@ functions:
21
21
- _Returns_twice
22
22
arguments :
23
23
- type : jmp_buf
24
- - name : sigsetjmp
25
- standards :
26
- - POSIX
27
- return_type : int
28
- attributes :
29
- - _Returns_twice
30
- arguments :
31
- - type : sigjmp_buf
32
- - type : int
33
- - name : siglongjmp
34
- standards :
35
- - POSIX
36
- return_type : _Noreturn void
37
- arguments :
38
- - type : sigjmp_buf
39
- - type : int
Original file line number Diff line number Diff line change 1
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /${LIBC_TARGET_OS} )
2
- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /${LIBC_TARGET_OS} )
3
- add_object_library(
4
- sigsetjmp_epilogue
5
- ALIAS
6
- DEPENDS
7
- .${LIBC_TARGET_OS} .sigsetjmp_epilogue
8
- )
9
- endif ()
10
-
11
1
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /${LIBC_TARGET_ARCHITECTURE} )
12
2
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /${LIBC_TARGET_ARCHITECTURE} )
13
3
endif ()
@@ -25,20 +15,3 @@ add_entrypoint_object(
25
15
DEPENDS
26
16
.${LIBC_TARGET_ARCHITECTURE} .longjmp
27
17
)
28
-
29
- add_entrypoint_object(
30
- siglongjmp
31
- SRCS
32
- siglongjmp.cpp
33
- HDRS
34
- siglongjmp.h
35
- DEPENDS
36
- .longjmp
37
- )
38
-
39
- add_entrypoint_object(
40
- sigsetjmp
41
- ALIAS
42
- DEPENDS
43
- .${LIBC_TARGET_ARCHITECTURE} .sigsetjmp
44
- )
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ namespace LIBC_NAMESPACE_DECL {
29
29
#ifdef LIBC_COMPILER_IS_GCC
30
30
[[gnu::nothrow]]
31
31
#endif
32
- [[gnu::returns_twice]] int
33
- setjmp (jmp_buf buf);
32
+ __attribute__ ((returns_twice)) int setjmp (jmp_buf buf);
34
33
35
34
} // namespace LIBC_NAMESPACE_DECL
36
35
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,22 +5,9 @@ add_entrypoint_object(
5
5
HDRS
6
6
../setjmp_impl.h
7
7
DEPENDS
8
- libc.hdr.offsetof_macros
9
8
libc.hdr.types.jmp_buf
10
- )
11
-
12
- add_entrypoint_object(
13
- sigsetjmp
14
- SRCS
15
- sigsetjmp.cpp
16
- HDRS
17
- ../sigsetjmp.h
18
- DEPENDS
19
- libc.hdr.types.jmp_buf
20
- libc.hdr.types.sigset_t
21
- libc.hdr.offsetof_macros
22
- libc.src.setjmp.sigsetjmp_epilogue
23
- libc.src.setjmp.setjmp
9
+ COMPILE_OPTIONS
10
+ ${libc_opt_high_flag}
24
11
)
25
12
26
13
add_entrypoint_object(
@@ -31,4 +18,7 @@ add_entrypoint_object(
31
18
../longjmp.h
32
19
DEPENDS
33
20
libc.hdr.types.jmp_buf
21
+ COMPILE_OPTIONS
22
+ ${libc_opt_high_flag}
23
+ -fomit-frame-pointer
34
24
)
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #include " hdr/offsetof_macros .h"
9
+ #include " include/llvm-libc-macros/offsetof-macro .h"
10
10
#include " src/__support/common.h"
11
11
#include " src/__support/macros/config.h"
12
12
#include " src/setjmp/setjmp_impl.h"
You can’t perform that action at this time.
0 commit comments