projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
87073aa
)
Update tablegen parser to allow defm names to start with #NAME.
author
Craig Topper
<craig.topper@gmail.com>
Thu, 27 Dec 2012 06:32:52 +0000
(06:32 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Thu, 27 Dec 2012 06:32:52 +0000
(06:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171140
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/TableGen/TGParser.cpp
patch
|
blob
|
history
diff --git
a/lib/TableGen/TGParser.cpp
b/lib/TableGen/TGParser.cpp
index 17f0abc974771c9bdd45de85ad4d7fd5db1f0664..e5875ad7957ed8ec15a76bd341a2d3c5c8bc31b5 100644
(file)
--- a/
lib/TableGen/TGParser.cpp
+++ b/
lib/TableGen/TGParser.cpp
@@
-2406,7
+2406,11
@@
bool TGParser::ParseDefm(MultiClass *CurMultiClass) {
Init *DefmPrefix = 0;
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);
}
DefmPrefix = ParseObjectName(CurMultiClass);
}