[TableGen] Remove unnecessary check before calling SmallVector::erase. NFC
[llvm-project.git] / libc / src / __support / File / linux / stdout.cpp
blob0d3b9f3d037689662cedfad0c619f5d9ed4afb65
1 //===--- Definition of Linux stdout ---------------------------------------===//
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 #include "file.h"
10 #include "hdr/stdio_macros.h"
11 #include "hdr/types/FILE.h"
12 #include "src/__support/macros/config.h"
14 namespace LIBC_NAMESPACE_DECL {
16 constexpr size_t STDOUT_BUFFER_SIZE = 1024;
17 uint8_t stdout_buffer[STDOUT_BUFFER_SIZE];
18 static LinuxFile StdOut(1, stdout_buffer, STDOUT_BUFFER_SIZE, _IOLBF, false,
19 File::ModeFlags(File::OpenMode::APPEND));
20 File *stdout = &StdOut;
22 } // namespace LIBC_NAMESPACE_DECL
24 extern "C" {
25 FILE *stdout = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::StdOut);
26 } // extern "C"