diff options
author | David Greene <greened@obbligato.org> | 2010-01-05 19:11:42 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2010-01-05 19:11:42 +0000 |
commit | 6786d5e18387465d6106eaef0b7923526ef0bc10 (patch) | |
tree | 3665a60a078ae910aeff79fc75a4c8eb9f918781 /utils/TableGen/TGLexer.cpp | |
parent | 5f7775c85e60aa659ac76c4b18f7a1f6494f23e2 (diff) |
Add an !eq() operator to TableGen. It operates on strings only.
Use !cast<string>() to compare other types of objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGLexer.cpp')
-rw-r--r-- | utils/TableGen/TGLexer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/TableGen/TGLexer.cpp b/utils/TableGen/TGLexer.cpp index 4498e305b0..2c7becc718 100644 --- a/utils/TableGen/TGLexer.cpp +++ b/utils/TableGen/TGLexer.cpp @@ -434,6 +434,7 @@ tgtok::TokKind TGLexer::LexExclaim() { 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 == 2 && !memcmp(Start, "eq", 2)) return tgtok::XEq; if (Len == 9 && !memcmp(Start, "strconcat", 9)) return tgtok::XStrConcat; if (Len == 10 && !memcmp(Start, "nameconcat", 10)) return tgtok::XNameConcat; if (Len == 5 && !memcmp(Start, "subst", 5)) return tgtok::XSubst; |