[libc-commits] [libc] [libc] Extend the baremetal I/O vendor ABI (PR #98683)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 12 12:22:18 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff ce9035f5bd3aa09cbd899489cdbc7f6c18acf1e3 57cf707b51dc7e261d866c21cb554c04a14d6ddb --extensions h,cpp -- libc/src/__support/OSUtil/baremetal/io.cpp libc/src/__support/OSUtil/baremetal/io.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/OSUtil/baremetal/io.cpp b/libc/src/__support/OSUtil/baremetal/io.cpp
index bd5946f267..411b6dd2c5 100644
--- a/libc/src/__support/OSUtil/baremetal/io.cpp
+++ b/libc/src/__support/OSUtil/baremetal/io.cpp
@@ -42,7 +42,8 @@ extern struct __llvm_libc_stdio_cookie __llvm_libc_stdout_cookie;
extern struct __llvm_libc_stdio_cookie __llvm_libc_stderr_cookie;
extern "C" ssize_t __llvm_libc_stdio_read(void *cookie, char *buf, size_t size);
-extern "C" ssize_t __llvm_libc_stdio_write(void *cookie, const char *buf, size_t size);
+extern "C" ssize_t __llvm_libc_stdio_write(void *cookie, const char *buf,
+ size_t size);
ssize_t read_from_stdin(char *buf, size_t size) {
return __llvm_libc_stdio_read(static_cast<void *>(&__llvm_libc_stdin_cookie),
@@ -51,12 +52,12 @@ ssize_t read_from_stdin(char *buf, size_t size) {
void write_to_stdout(cpp::string_view msg) {
__llvm_libc_stdio_write(static_cast<void *>(&__llvm_libc_stdout_cookie),
- msg.data(), msg.size());
+ msg.data(), msg.size());
}
void write_to_stderr(cpp::string_view msg) {
__llvm_libc_stdio_write(static_cast<void *>(&__llvm_libc_stderr_cookie),
- msg.data(), msg.size());
+ msg.data(), msg.size());
}
} // namespace LIBC_NAMESPACE
``````````
</details>
https://github.com/llvm/llvm-project/pull/98683
More information about the libc-commits
mailing list