forked from OSchip/llvm-project
docs: Bring TableGen syntax a bit closer to reality.
It's not just def's but actually a limited subset of Object's that are allowed inside a multiclass. Spotted by Joel Jones. llvm-svn: 171935
This commit is contained in:
parent
89f255e426
commit
c95fe2804d
|
@ -370,6 +370,7 @@ applied at the end of parsing the base classes of a record.
|
|||
|
||||
.. productionlist::
|
||||
MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`]
|
||||
: [":" `BaseMultiClassList`] "{" `MultiClassDef`+ "}"
|
||||
: [":" `BaseMultiClassList`] "{" `MultiClassObject`+ "}"
|
||||
BaseMultiClassList: `MultiClassID` ("," `MultiClassID`)*
|
||||
MultiClassID: `TokIdentifier`
|
||||
MultiClassObject: `Def` | `Defm` | `Let` | `Foreach`
|
||||
|
|
|
@ -2160,7 +2160,12 @@ bool TGParser::ParseTopLevelLet(MultiClass *CurMultiClass) {
|
|||
/// ParseMultiClass - Parse a multiclass definition.
|
||||
///
|
||||
/// MultiClassInst ::= MULTICLASS ID TemplateArgList?
|
||||
/// ':' BaseMultiClassList '{' MultiClassDef+ '}'
|
||||
/// ':' BaseMultiClassList '{' MultiClassObject+ '}'
|
||||
/// MultiClassObject ::= DefInst
|
||||
/// MultiClassObject ::= MultiClassInst
|
||||
/// MultiClassObject ::= DefMInst
|
||||
/// MultiClassObject ::= LETCommand '{' ObjectList '}'
|
||||
/// MultiClassObject ::= LETCommand Object
|
||||
///
|
||||
bool TGParser::ParseMultiClass() {
|
||||
assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token");
|
||||
|
|
Loading…
Reference in New Issue