SSiva Chandra Reddy[libc][NFC] Add explicit casts to ctype functions
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc][nfc] move ctype_utils and FPUtils to __support Some ctype functions are called from other libc functions (e.g. isspace is used in atoi). By moving ctype_utils.h to __support it becomes easier to include just the implementations of these functions. For these reasons the implementation for isspace was moved into ctype_utils as well. FPUtils was moved to simplify the build order, and to clarify which files are a part of the actual libc. Many files were modified to accomodate these changes, mostly changing the #include paths. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D107600 | 4 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Implements isdigit and isalnum. Adds a utility header to inline functions to avoid overhead of function calls. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D84893 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add scaffolding for ctype and implementation of isalpha Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D84575 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Use #undef isascii in specific header Standard C allows all standard headers to declare macros for all their functions. So after possibly including any standard header like <ctype.h>, it's perfectly normal for any and all of the functions it declares to be defined as macros. Standard C requires explicit #undef before using that identifier in a way that is not compatible with function-like macro definitions. The C standard's rules for this are extended to POSIX as well for the interfaces it defines, and it's the expected norm for nonstandard extensions declared by standard C library headers too. So far the only place this has come up for llvm-libc's code is with the isascii function in Fuchsia's libc. But other cases can arise for any standard (or common extension) function names that source code in llvm-libc is using in nonstandard ways, i.e. as C++ identifiers. The only correct and robust way to handle the possible inclusion of standard C library headers when building llvm-libc source code is to use #undef explicitly for each identifier before using it. The easy and obvious place to do that is in the per-function header. This requires that all code, such as test code, that might include any standard C library headers, e.g. via utils/UnitTest/Test.h, make sure to include those *first* before the per-function header. This change does that for isascii and its test. But it should be done uniformly for all the code and documented as a consistent convention so new implementation files are sure to get this right. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D94642 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add implementations for isblank, iscntrl, isgraph, ispunct. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85059 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add implementations for isblank, iscntrl, isgraph, ispunct. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85059 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Implements isdigit and isalnum. Adds a utility header to inline functions to avoid overhead of function calls. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D84893 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add implementations for isblank, iscntrl, isgraph, ispunct. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85059 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add islower and isupper implementation. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D84960 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add isspace, isprint, isxdigit implementations. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85270 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add implementations for isblank, iscntrl, isgraph, ispunct. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85059 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add isspace, isprint, isxdigit implementations. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85270 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add islower and isupper implementation. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D84960 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add isspace, isprint, isxdigit implementations. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85270 | 5 年前 | |
[libc] add isascii and toascii implementations adding both at once since these are trivial functions. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D94558 | 5 年前 | |
[libc] add isascii and toascii implementations adding both at once since these are trivial functions. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D94558 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add tolower, toupper implementation. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85326 | 5 年前 | |
[libc][NFC] Add explicit casts to ctype functions Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902 | 4 年前 | |
[libc] Add tolower, toupper implementation. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D85326 | 5 年前 |