diff options
| author | David Greene <greened@obbligato.org> | 2009-04-22 20:18:10 +0000 |
|---|---|---|
| committer | David Greene <greened@obbligato.org> | 2009-04-22 20:18:10 +0000 |
| commit | a9c6c5d39bd577a25801c39ca38b38ea4f68ce45 (patch) | |
| tree | cea7342c35f45d16c4e61415e5c026eeb71ab453 /llvm/utils/TableGen/TGLexer.cpp | |
| parent | d3a5a9d7fa4922d5399de56c7ef67dbb4eb23b24 (diff) | |
| download | bcm5719-llvm-a9c6c5d39bd577a25801c39ca38b38ea4f68ce45.tar.gz bcm5719-llvm-a9c6c5d39bd577a25801c39ca38b38ea4f68ce45.zip | |
Implement !nameconcat to concatenate strings and look up the resulting
name in the symbol table, returning an object.
llvm-svn: 69822
Diffstat (limited to 'llvm/utils/TableGen/TGLexer.cpp')
| -rw-r--r-- | llvm/utils/TableGen/TGLexer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/TGLexer.cpp b/llvm/utils/TableGen/TGLexer.cpp index 79982aa05f5..f2ea7a15171 100644 --- a/llvm/utils/TableGen/TGLexer.cpp +++ b/llvm/utils/TableGen/TGLexer.cpp @@ -429,11 +429,12 @@ tgtok::TokKind TGLexer::LexExclaim() { // Check to see which operator this is. unsigned Len = CurPtr-Start; - if (Len == 3 && !memcmp(Start, "con", 3)) return tgtok::XConcat; - if (Len == 3 && !memcmp(Start, "sra", 3)) return tgtok::XSRA; - if (Len == 3 && !memcmp(Start, "srl", 3)) return tgtok::XSRL; - if (Len == 3 && !memcmp(Start, "shl", 3)) return tgtok::XSHL; - if (Len == 9 && !memcmp(Start, "strconcat", 9)) return tgtok::XStrConcat; + if (Len == 3 && !memcmp(Start, "con", 3)) return tgtok::XConcat; + if (Len == 3 && !memcmp(Start, "sra", 3)) return tgtok::XSRA; + if (Len == 3 && !memcmp(Start, "srl", 3)) return tgtok::XSRL; + if (Len == 3 && !memcmp(Start, "shl", 3)) return tgtok::XSHL; + if (Len == 9 && !memcmp(Start, "strconcat", 9)) return tgtok::XStrConcat; + if (Len == 10 && !memcmp(Start, "nameconcat", 10)) return tgtok::XNameConcat; return ReturnError(Start-1, "Unknown operator"); } |

