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
This commit is contained in:
Craig Topper 2012-12-27 06:32:52 +00:00
parent 87073aad8f
commit 025c5de9ba

View File

@ -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);
}