diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-12-27 06:32:52 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-12-27 06:32:52 +0000 |
commit | 025c5de9bac36e98340944e29fa316e53002e354 (patch) | |
tree | 38d3bf22153444b00a1c58cdc84e9a89b3236446 /lib/TableGen/TGParser.cpp | |
parent | 87073aad8fca0663405c4318bf70794e149342ab (diff) |
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
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 17f0abc974..e5875ad795 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); } |