[libc] add printf writer
authorMichael Jones <michaelrj@google.com>
Mon, 25 Apr 2022 22:46:03 +0000 (15:46 -0700)
committerMichael Jones <michaelrj@google.com>
Tue, 3 May 2022 17:15:04 +0000 (10:15 -0700)
commite072a123d3b24995b0921802d69c93c08e3667bf
tree3122a3e4305a674a03fef02f5ae29a241d703be3
parent5d1dbe11194466151aafc139663d49ded00c92a7
[libc] add printf writer

The printf implmentation is made up of three main pieces, the parser,
the converter, and the writer. This patch adds the implementation for
the writer, as well as the function for writing to a string, along with
tests.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D124421
libc/src/stdio/printf_core/CMakeLists.txt
libc/src/stdio/printf_core/string_writer.h [new file with mode: 0644]
libc/src/stdio/printf_core/writer.cpp [new file with mode: 0644]
libc/src/stdio/printf_core/writer.h
libc/test/src/stdio/printf_core/CMakeLists.txt
libc/test/src/stdio/printf_core/string_writer_test.cpp [new file with mode: 0644]