[libc-commits] [PATCH] D147375: [libc] Use string_view for write_to_stderr
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sat Apr 1 05:09:29 PDT 2023
jhuber6 added a comment.
Do we want to stop using `const char *`? We only use this internally currently, but it was easier for me to test when it was a C type. I'll let @sivachandra decide.
================
Comment at: libc/src/__support/OSUtil/gpu/io.cpp:22
+
+LIBCI_INLINE void send_null_terminated(cpp::string_view src) {
+ rpc::client.run(
----------------
================
Comment at: libc/src/__support/OSUtil/gpu/io.cpp:26
+ buffer->data[0] = rpc::Opcode::PRINT_TO_STDERR;
+ char *data = (char *)&buffer->data[1];
+ inline_memcpy(data, src.data(), src.size());
----------------
Does `libc` not use C++ style casts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147375/new/
https://reviews.llvm.org/D147375
More information about the libc-commits
mailing list