| Issue |
109841
|
| Summary |
[libc] Make char parsing code encoding independent
|
| Labels |
code-cleanup,
libc
|
| Assignees |
|
| Reporter |
michaelrj-google
|
What: Some of our string parsing code assumes ASCII, for example the string to integer code: https://github.com/llvm/llvm-project/blob/main/libc/src/__support/str_to_integer.h#L37 We should move this to be encoding independant, likely using switch statements.
Why change it: Easier support for non-ASCII character encodings (e.g. wide character, EBCDIC).
Will be bad for performance: No, it might actually be better. Clang is very good at optimizing this sort of switch statement: https://godbolt.org/z/qvrebqvvr
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs