This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add v variants of printf functions
ClosedPublic

Authored by michaelrj on Aug 4 2023, 2:02 PM.

Details

Summary

The v variants of the printf functions take their variadic arguments as
a va_list instead of as individual arguments. They are otherwise
identical to the corresponding printf variants. This patch adds them
(vprintf, vfprintf, vsprintf, and vsnprintf) as well as tests.

Diff Detail

Event Timeline

michaelrj created this revision.Aug 4 2023, 2:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 4 2023, 2:02 PM
michaelrj requested review of this revision.Aug 4 2023, 2:02 PM
phosek accepted this revision.Aug 4 2023, 2:13 PM
phosek added inline comments.
libc/test/src/stdio/vsprintf_test.cpp
27–29

This doesn't seem to be used anywhere.

This revision is now accepted and ready to land.Aug 4 2023, 2:13 PM
michaelrj updated this revision to Diff 547362.Aug 4 2023, 2:49 PM
michaelrj marked an inline comment as done.

rebase and add bazel support

This revision was landed with ongoing or failed builds.Aug 4 2023, 2:50 PM
This revision was automatically updated to reflect the committed changes.