diff options
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r-- | llvm/lib/TableGen/TGParser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 3fc2e53f208..f9486d4469d 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -2283,6 +2283,10 @@ void TGParser::ParseValueList(SmallVectorImpl<Init*> &Result, Record *CurRec, while (Lex.getCode() == tgtok::comma) { Lex.Lex(); // Eat the comma + // ignore trailing comma for lists + if (Lex.getCode() == tgtok::r_square) + return; + if (ArgsRec && !EltTy) { ArrayRef<Init *> TArgs = ArgsRec->getTemplateArgs(); if (ArgN >= TArgs.size()) { |