summaryrefslogtreecommitdiff
path: root/libc/src/time/strftime.cpp
AgeCommit message (Collapse)Author
2025-03-12[libc] Template the writing mode for the writer class (#111559)Joseph Huber
Summary: Currently we dispatch the writing mode off of a runtime enum passed in by the constructor. This causes very unfortunate codegen for the GPU targets where we get worst-case codegen because of the unused function pointer for `sprintf`. Instead, this patch moves all of this to a template so it can be masked out. This results in no dynamic stack and uses 60 VGPRs instead of 117. It also compiles about 5x as fast.
2025-02-21[libc] Add strftime_l (#127767)Petr Hosek
This is a (no-op) locale version of strftime. Fixes: https://github.com/llvm/llvm-project/issues/106630
2025-02-19Revert "[libc] Add strftime_l" (#127766)Petr Hosek
Reverts llvm/llvm-project#127708
2025-02-18[libc] Add strftime_l (#127708)Petr Hosek
This is a (no-op) locale version of strftime.
2025-02-14[libc] Implement strftime (#122556)Michael Jones
Implements the posix-specified strftime conversions for the default locale, along with comprehensive unit tests. This reuses a lot of design from printf, as well as the printf writer. Roughly based on #111305, but with major rewrites.