diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-09 21:08:21 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-09 21:08:21 +0000 |
commit | 1b791d6465d42a9763927be1dd8af229efcbbf5e (patch) | |
tree | b44e2dd21a865a3fd06456bbc4170aceab68b650 /lib/Lex/Lexer.cpp | |
parent | e08ce650a2b02410eddd1f60a4aa6b3d4be71e73 (diff) |
Lexer: add CUDA kernel call tokens
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index 7c94528c64..fd5bb617a0 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -2323,6 +2323,10 @@ LexNextToken: // If this is actually a '<<<<<<<' version control conflict marker, // recognize it as such and recover nicely. goto LexNextToken; + } else if (Features.CUDA && After == '<') { + Kind = tok::lesslessless; + CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), + SizeTmp2, Result); } else { CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); Kind = tok::lessless; @@ -2354,6 +2358,10 @@ LexNextToken: } else if (After == '>' && HandleEndOfConflictMarker(CurPtr-1)) { // If this is '>>>>>>>' and we're in a conflict marker, ignore it. goto LexNextToken; + } else if (Features.CUDA && After == '>') { + Kind = tok::greatergreatergreater; + CurPtr = ConsumeChar(ConsumeChar(CurPtr, SizeTmp, Result), + SizeTmp2, Result); } else { CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); Kind = tok::greatergreater; |