diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-14 01:42:53 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-14 01:42:53 +0000 |
commit | f315fa81eef1977b3457fd7a7d4639e060fe7278 (patch) | |
tree | fb0c5fe261db55120bc28e6ad4d84342d830c0dd /lib/Basic/IdentifierTable.cpp | |
parent | 321b8179afaf803dcc56b2a19f7b0891a03c92c8 (diff) |
OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas. Patch originally by ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 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 47f12923a2..48a5f49914 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -90,7 +90,8 @@ namespace { BOOLSUPPORT = 64, KEYALTIVEC = 128, KEYNOCXX = 256, - KEYBORLAND = 512 + KEYBORLAND = 512, + KEYOPENCL = 1024 }; } @@ -115,6 +116,7 @@ static void AddKeyword(llvm::StringRef Keyword, else if (LangOpts.Borland && (Flags & KEYBORLAND)) AddResult = 1; else if (LangOpts.Bool && (Flags & BOOLSUPPORT)) AddResult = 2; else if (LangOpts.AltiVec && (Flags & KEYALTIVEC)) AddResult = 2; + else if (LangOpts.OpenCL && (Flags & KEYOPENCL)) AddResult = 2; else if (!LangOpts.CPlusPlus && (Flags & KEYNOCXX)) AddResult = 2; // Don't add this keyword if disabled in this language. |