[libc][NFC] add "LlvmLibc" as a prefix to all test namesSummary:Having a consistent prefix makes selecting all of the llvm libc testseasier on any platform that is also using the gtest framework.
[libc][NFC] add "LlvmLibc" as a prefix to all test namesSummary:Having a consistent prefix makes selecting all of the llvm libc testseasier on any platform that is also using the gtest framework.This also modifies the TEST and TEST_F macros to enforce this changemoving forward.Reviewers: sivachandraSubscribers:
show more ...
[libc] Use #undef isascii in specific headerStandard C allows all standard headers to declare macros for alltheir functions. So after possibly including any standard headerlike <ctype.h>, it's p
[libc] Use #undef isascii in specific headerStandard C allows all standard headers to declare macros for alltheir functions. So after possibly including any standard headerlike <ctype.h>, it's perfectly normal for any and all of thefunctions it declares to be defined as macros. Standard C requiresexplicit `#undef` before using that identifier in a way that is notcompatible with function-like macro definitions.The C standard's rules for this are extended to POSIX as well forthe interfaces it defines, and it's the expected norm fornonstandard extensions declared by standard C library headers too.So far the only place this has come up for llvm-libc's code is withthe isascii function in Fuchsia's libc. But other cases can arisefor any standard (or common extension) function names that sourcecode in llvm-libc is using in nonstandard ways, i.e. as C++identifiers.The only correct and robust way to handle the possible inclusion ofstandard C library headers when building llvm-libc source code is touse `#undef` explicitly for each identifier before using it. Theeasy and obvious place to do that is in the per-function header.This requires that all code, such as test code, that might includeany standard C library headers, e.g. via utils/UnitTest/Test.h, makesure to include those *first* before the per-function header.This change does that for isascii and its test. But it should bedone uniformly for all the code and documented as a consistentconvention so new implementation files are sure to get this right.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D94642
[libc] add isascii and toascii implementationsadding both at once since these are trivial functions.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D94558
[libc] Add tolower, toupper implementation.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D85326
[libc] Add isspace, isprint, isxdigit implementations.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D85270
[libc] Add implementations for isblank, iscntrl, isgraph, ispunct.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D85059
[libc] Add islower and isupper implementation.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D84960
[libc] Implements isdigit and isalnum. Adds a utility header to inlinefunctions to avoid overhead of function calls.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D84893
[libc] Add scaffolding for ctype and implementation of isalphaReviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D84575