1 | //===---------- Baremetal implementation of IO utils ------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #include "io.h" |
10 | |
11 | #include "src/__support/CPP/string_view.h" |
12 | |
13 | // This is intended to be provided by the vendor. |
14 | extern "C" void __llvm_libc_log_write(const char *msg, size_t len); |
15 | |
16 | namespace LIBC_NAMESPACE { |
17 | |
18 | void write_to_stderr(cpp::string_view msg) { |
19 | __llvm_libc_log_write(msg: msg.data(), len: msg.size()); |
20 | } |
21 | |
22 | } // namespace LIBC_NAMESPACE |
23 | |