Lexer Support for Multidefs

Add keyword support for multidefs.

llvm-svn: 141231
This commit is contained in:
David Greene 2011-10-05 22:42:35 +00:00
parent 87cf662fbd
commit dd88abaa97
2 changed files with 2 additions and 1 deletions

View File

@ -228,6 +228,7 @@ tgtok::TokKind TGLexer::LexIdentifier() {
if (Len == 5 && !memcmp(IdentStart, "class", 5)) return tgtok::Class;
if (Len == 3 && !memcmp(IdentStart, "def", 3)) return tgtok::Def;
if (Len == 8 && !memcmp(IdentStart, "multidef", 3)) return tgtok::MultiDef;
if (Len == 4 && !memcmp(IdentStart, "defm", 4)) return tgtok::Defm;
if (Len == 10 && !memcmp(IdentStart, "multiclass", 10))
return tgtok::MultiClass;

View File

@ -41,7 +41,7 @@ namespace tgtok {
equal, question, // = ?
// Keywords.
Bit, Bits, Class, Code, Dag, Def, Defm, Field, In, Int, Let, List,
Bit, Bits, Class, Code, Dag, Def, MultiDef, Defm, Field, In, Int, Let, List,
MultiClass, String,
// !keywords.