1 //===-- FILE Writer implementation for printf -------------------*- 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 "src/stdio/printf_core/file_writer.h"
10 #include "src/__support/File/file.h"
11 #include <stddef.h>
12 
13 namespace __llvm_libc {
14 namespace printf_core {
15 
16 void write_to_file(void *raw_pointer, const char *__restrict to_write,
17                    size_t len) {
18   __llvm_libc::File *file = reinterpret_cast<__llvm_libc::File *>(raw_pointer);
19   file->write(to_write, len);
20 }
21 
22 } // namespace printf_core
23 } // namespace __llvm_libc
24