Pull Lexer's CharInfo table out for general use throughout Clang.
authorJordan Rose <jordan_rose@apple.com>
Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)
commita2100d755ad9f24261360fe3d1da725a1d3c8530
treef8d6073807d7a65835a38830422960d5f2a050af
parent72fffbab66da9a0b760371780313f97a45647526
Pull Lexer's CharInfo table out for general use throughout Clang.

Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).

The next commit will try to clean up uses of <ctype.h> functions within Clang.

llvm-svn: 174765
clang/include/clang/Basic/CharInfo.h [new file with mode: 0644]
clang/lib/Basic/CMakeLists.txt
clang/lib/Basic/CharInfo.cpp [new file with mode: 0644]
clang/lib/Lex/Lexer.cpp
clang/unittests/Basic/CMakeLists.txt
clang/unittests/Basic/CharInfoTest.cpp [new file with mode: 0644]