Skip to content

Conversation

@PiJoules
Copy link
Contributor

This addresses build errors from #111559.

@llvmbot
Copy link
Member

llvmbot commented Mar 13, 2025

@llvm/pr-subscribers-libc

Author: None (PiJoules)

Changes

This addresses build errors from #111559.


Full diff: https://github.com/llvm/llvm-project/pull/131232.diff

2 Files Affected:

  • (modified) libc/src/stdio/baremetal/printf.cpp (+2-2)
  • (modified) libc/src/stdio/baremetal/vprintf.cpp (+2-2)
diff --git a/libc/src/stdio/baremetal/printf.cpp b/libc/src/stdio/baremetal/printf.cpp
index ff03f1f2f408b..c94698ec02953 100644
--- a/libc/src/stdio/baremetal/printf.cpp
+++ b/libc/src/stdio/baremetal/printf.cpp
@@ -38,9 +38,9 @@ LLVM_LIBC_FUNCTION(int, printf, (const char *__restrict format, ...)) {
   constexpr size_t BUFF_SIZE = 1024;
   char buffer[BUFF_SIZE];
 
-  printf_core::WriteBuffer<Mode<WriteMode::FLUSH_TO_STREAM>::value> wb(
+  printf_core::WriteBuffer<printf_core::WriteMode::FLUSH_TO_STREAM> wb(
       buffer, BUFF_SIZE, &raw_write_hook, nullptr);
-  printf_core::Writer writer(&wb);
+  printf_core::Writer<printf_core::WriteMode::FLUSH_TO_STREAM> writer(wb);
 
   int retval = printf_core::printf_main(&writer, format, args);
 
diff --git a/libc/src/stdio/baremetal/vprintf.cpp b/libc/src/stdio/baremetal/vprintf.cpp
index 8e49ed633c4f9..3e8631abd90d9 100644
--- a/libc/src/stdio/baremetal/vprintf.cpp
+++ b/libc/src/stdio/baremetal/vprintf.cpp
@@ -36,9 +36,9 @@ LLVM_LIBC_FUNCTION(int, vprintf,
   constexpr size_t BUFF_SIZE = 1024;
   char buffer[BUFF_SIZE];
 
-  printf_core::WriteBuffer<Mode<WriteMode::FLUSH_TO_STREAM>::value> wb(
+  printf_core::WriteBuffer<printf_core::WriteMode::FLUSH_TO_STREAM> wb(
       buffer, BUFF_SIZE, &raw_write_hook, nullptr);
-  printf_core::Writer writer(&wb);
+  printf_core::Writer<printf_core::WriteMode::FLUSH_TO_STREAM> writer(wb);
 
   int retval = printf_core::printf_main(&writer, format, args);
 

@PiJoules PiJoules merged commit 662bd4c into llvm:main Mar 13, 2025
15 of 17 checks passed
@PiJoules PiJoules deleted the printf-fixes branch March 13, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants