[libc-commits] [libc] [libc][stdio] Implement putchar_unlocked (PR #243331)

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Mon Nov 16 21:59:33 PST 2026


================
@@ -0,0 +1,92 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Unittests for putchar_unlocked.
+///
+//===----------------------------------------------------------------------===//
+
+#include "hdr/stdio_macros.h"
+#include "src/__support/CPP/scope.h"
+#include "src/__support/macros/properties/os.h"
+#include "src/stdio/fclose.h"
+#include "src/stdio/ferror.h"
+#include "src/stdio/fflush.h"
+#include "src/stdio/fopen.h"
+#include "src/stdio/fread.h"
+#include "src/stdio/freopen.h"
+#include "src/stdio/putchar_unlocked.h"
+#include "src/stdio/stdout.h"
+#include "src/string/memcmp.h"
+#include "test/UnitTest/ErrnoCheckingTest.h"
+#include "test/UnitTest/ErrnoSetterMatcher.h"
+#include "test/UnitTest/Test.h"
+
+using LIBC_NAMESPACE::cpp::scope_exit;
+using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
+
+class LlvmLibcPutcharUnlockedTest
----------------
vonosmas wrote:

Why not just use a typedef?

https://github.com/llvm/llvm-project/pull/243331


More information about the libc-commits mailing list