Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / src / __support / OSUtil / fuchsia / io.h
blob9a5e00beaa316cab8f5a88e57379c8790dd6e9ec
1 //===------------- Fuchsia 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_FUCHSIA_IO_H
10 #define LLVM_LIBC_SRC___SUPPORT_OSUTIL_FUCHSIA_IO_H
12 #ifndef LIBC_COPT_TEST_USE_FUCHSIA
13 #error this file should only be used by tests
14 #endif
16 #include "src/__support/CPP/string_view.h"
18 #include <zircon/sanitizer.h>
20 namespace LIBC_NAMESPACE {
22 LIBC_INLINE void write_to_stderr(cpp::string_view msg) {
23 __sanitizer_log_write(msg.data(), msg.size());
26 } // namespace LIBC_NAMESPACE
28 #endif // LLVM_LIBC_SRC___SUPPORT_OSUTIL_FUCHSIA_IO_H