================
@@ -7,18 +7,13 @@
 
//===----------------------------------------------------------------------===//
 
 #include "src/stdio/putchar.h"
-#include "src/__support/CPP/string_view.h"
-#include "src/__support/OSUtil/io.h"
+
+#include "src/__support/common.h"
 #include "src/__support/macros/config.h"
+#include "src/stdio/baremetal/fputc_internal.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(int, putchar, (int c)) {
-  char uc = static_cast<char>(c);
-
-  write_to_stdout(cpp::string_view(&uc, 1));
-
-  return 0;
-}
+LLVM_LIBC_FUNCTION(int, putchar, (int c)) { return fputc_internal(c, stdout); }
----------------
petrhosek wrote:

I believe this should be addressed in the latest version.

https://github.com/llvm/llvm-project/pull/168931
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to