From: Craig Topper Date: Thu, 27 Dec 2012 06:32:52 +0000 (+0000) Subject: Update tablegen parser to allow defm names to start with #NAME. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=025c5de9bac36e98340944e29fa316e53002e354;p=oota-llvm.git Update tablegen parser to allow defm names to start with #NAME. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171140 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 17f0abc9747..e5875ad7957 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -2406,7 +2406,11 @@ bool TGParser::ParseDefm(MultiClass *CurMultiClass) { Init *DefmPrefix = 0; - if (Lex.Lex() == tgtok::Id) { // eat the defm. + Lex.Lex(); // eat the defm. + + // Note that tgtok::paste is here to allow starting with #NAME. + if (Lex.getCode() == tgtok::Id || + Lex.getCode() == tgtok::paste) { DefmPrefix = ParseObjectName(CurMultiClass); }