diff options
author | Nate Begeman <natebegeman@mac.com> | 2009-06-25 23:25:15 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2009-06-25 23:25:15 +0000 |
commit | 72b60e35600f5789056f73eca35713a1b83b6594 (patch) | |
tree | 76be440afa3317c0f507c6b61dff869a989f086a /lib/Basic/IdentifierTable.cpp | |
parent | b9e7e63ae2098bc02e79c032df0a3124d09a4b4e (diff) |
OpenCL 1.0 Support: support "bool, true, false" tokens when compiling for OpenCL
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | lib/Basic/IdentifierTable.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index cf78da9869..d13ffa3821 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -66,7 +66,8 @@ namespace { KEYCXX = 4, KEYCXX0X = 8, KEYGNU = 16, - KEYMS = 32 + KEYMS = 32, + BOOLSUPPORT = 64 }; } @@ -88,6 +89,7 @@ static void AddKeyword(const char *Keyword, unsigned KWLen, else if (LangOpts.C99 && (Flags & KEYC99)) AddResult = 2; else if (LangOpts.GNUMode && (Flags & KEYGNU)) AddResult = 1; else if (LangOpts.Microsoft && (Flags & KEYMS)) AddResult = 1; + else if (LangOpts.OpenCL && (Flags & BOOLSUPPORT)) AddResult = 2; // Don't add this keyword if disabled in this language. if (AddResult == 0) return; |