Kewen Meng
c5aaee0bb0
Revert commit d8e5698 and 15b19c7 ( #166498 )
2025-11-04 19:43:16 -08:00
Marcell Leleszi
d8e56988f8
[libc] Add printf error handling (with fixes) ( #166382 )
...
https://github.com/llvm/llvm-project/issues/159474
Resubmitting https://github.com/llvm/llvm-project/pull/162876 with fixes
as it broke some buildbots:
- Fix comparisons of integer expressions of different signedness
- Not check for specific errnos in tests, as they might not be available
on all platforms
2025-11-04 16:20:51 -08:00
Kewen Meng
346da3dfd3
Revert "[libc] Add printf error handling" ( #166232 )
2025-11-03 12:50:11 -08:00
Marcell Leleszi
0c707c9713
[libc] Add printf error handling ( #162876 )
...
[#159474 ](https://github.com/llvm/llvm-project/issues/159474 )
- All printf variants set errno and consistently return -1 on error,
instead of returning various predefined error codes
- Return value overflow handling is added
2025-11-03 11:15:14 -08:00
Joseph Huber
598e882ee8
[libc] Template the writing mode for the writer class ( #111559 )
...
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-03-12 13:51:44 -05:00
Petr Hosek
5ff3ff33ff
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration ( #98597 )
...
This is a part of #97655 .
2024-07-12 09:28:41 -07:00
Mehdi Amini
ce9035f5bd
Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" ( #98593 )
...
Reverts llvm/llvm-project#98075
bots are broken
2024-07-12 09:12:13 +02:00
Petr Hosek
3f30effe1b
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration ( #98075 )
...
This is a part of #97655 .
2024-07-11 12:35:22 -07:00
Vinayak Dev
2d97ba22f8
[libc]: Remove unused includes from strfrom*.cpp ( #86657 )
...
Removes unused header includes from `strfrom*()` implementation files.
2024-03-26 13:16:35 -07:00
Vinayak Dev
83e96977cd
[libc] Implement strfromd() and strfroml() ( #86113 )
...
Follow up to #85438 .
Implements the functions `strfromd()` and `strfroml()` introduced in
C23, and unifies the testing framework for `strfrom*()` functions.
2024-03-22 11:39:53 -07:00