diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2021-05-27 08:41:00 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2021-05-27 08:57:47 -0400 |
commit | 8edd3464afbff65d7d5945b3a8b20009d6ff5deb (patch) | |
tree | cf3cfa497887a03a7f140c6a9f908a2d87df7f2e /clang/lib/Basic/IdentifierTable.cpp | |
parent | ce4f99e7f272d481d0689c551d9818019992c841 (diff) | |
download | llvm-8edd3464afbff65d7d5945b3a8b20009d6ff5deb.zip llvm-8edd3464afbff65d7d5945b3a8b20009d6ff5deb.tar.gz llvm-8edd3464afbff65d7d5945b3a8b20009d6ff5deb.tar.bz2 |
Add support for #elifdef and #elifndef
WG14 adopted N2645 and WG21 EWG has accepted P2334 in principle (still
subject to full EWG vote + CWG review + plenary vote), which add
support for #elifdef as shorthand for #elif defined and #elifndef as
shorthand for #elif !defined. This patch adds support for the new
preprocessor directives.
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index e591530..3c18219 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -341,9 +341,11 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const { CASE( 6, 'p', 'a', pragma); CASE( 7, 'd', 'f', defined); + CASE( 7, 'e', 'i', elifdef); CASE( 7, 'i', 'c', include); CASE( 7, 'w', 'r', warning); + CASE( 8, 'e', 'i', elifndef); CASE( 8, 'u', 'a', unassert); CASE(12, 'i', 'c', include_next); |