[libc-commits] [libc] [libc] Refactor getopt to use standard reset and internal test hook (PR #197644)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Thu May 14 03:18:05 PDT 2026
kaladron wrote:
Heya Alexey! This patch does two main things:
1) Adds the much more common way of resetting state to our getopt implementation
2) Exposes an internal way of redirecting the error messages to a stream instead of stderr.
This came up because @lntue had a PR two years ago #79319 that made our hermeteic testing work against the external interfaces and I wanted to resurrect that (https://github.com/kaladron/llvm-project/tree/public-testing). I was going to have to expose set_getopt_state and wound up doing more general clean up pass on this file.
https://github.com/llvm/llvm-project/pull/197644
More information about the libc-commits
mailing list