File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
__support/OSUtil/baremetal Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include " src/__support/OSUtil/exit.h"
10
10
11
+ namespace LIBC_NAMESPACE ::internal {
12
+
11
13
// This is intended to be provided by the vendor.
12
14
extern " C" [[noreturn]] void __llvm_libc_exit (int status);
13
15
14
- namespace LIBC_NAMESPACE ::internal {
15
-
16
16
[[noreturn]] void exit (int status) { __llvm_libc_exit (status); }
17
17
18
18
} // namespace LIBC_NAMESPACE::internal
Original file line number Diff line number Diff line change 10
10
11
11
#include " src/__support/CPP/string_view.h"
12
12
13
+ namespace LIBC_NAMESPACE {
14
+
13
15
// This is intended to be provided by the vendor.
14
16
15
17
extern struct __llvm_libc_stdin __llvm_libc_stdin;
16
18
extern " C" ssize_t __llvm_libc_stdin_read (void *cookie, char *buf, size_t size);
17
19
18
20
extern " C" void __llvm_libc_log_write (const char *msg, size_t len);
19
21
20
- namespace LIBC_NAMESPACE {
21
-
22
22
ssize_t read_from_stdin (char *buf, size_t size) {
23
23
return __llvm_libc_stdin_read (reinterpret_cast <void *>(&__llvm_libc_stdin),
24
24
buf, size);
Original file line number Diff line number Diff line change 10
10
#include " src/__support/OSUtil/exit.h"
11
11
#include " src/__support/common.h"
12
12
13
- extern " C" void __cxa_finalize (void *);
14
-
15
13
namespace LIBC_NAMESPACE {
16
14
15
+ extern " C" void __cxa_finalize (void *);
16
+
17
17
[[noreturn]] LLVM_LIBC_FUNCTION(void , exit, (int status)) {
18
18
__cxa_finalize (nullptr );
19
19
internal::exit (status);
Original file line number Diff line number Diff line change 9
9
#include < stddef.h>
10
10
#include < stdint.h>
11
11
12
+ namespace LIBC_NAMESPACE {
13
+
12
14
extern " C" {
13
15
extern uintptr_t __fini_array_start[];
14
16
extern uintptr_t __fini_array_end[];
15
17
}
16
18
17
- namespace LIBC_NAMESPACE {
18
-
19
19
using FiniCallback = void (void );
20
20
21
21
extern " C" void __libc_fini_array (void ) {
Original file line number Diff line number Diff line change 9
9
#include < stddef.h>
10
10
#include < stdint.h>
11
11
12
+ namespace LIBC_NAMESPACE {
13
+
12
14
extern " C" {
13
15
extern uintptr_t __preinit_array_start[];
14
16
extern uintptr_t __preinit_array_end[];
15
17
extern uintptr_t __init_array_start[];
16
18
extern uintptr_t __init_array_end[];
17
19
}
18
20
19
- namespace LIBC_NAMESPACE {
20
-
21
21
using InitCallback = void (void );
22
22
23
23
extern " C" void __libc_init_array (void ) {
You can’t perform that action at this time.
0 commit comments