Index: lib/TableGen/TGParser.h =================================================================== --- lib/TableGen/TGParser.h +++ lib/TableGen/TGParser.h @@ -77,7 +77,6 @@ ParseValueMode, // We are parsing a value we expect to look up. ParseNameMode, // We are parsing a name of an object that does not yet // exist. - ParseForeachMode // We are parsing a foreach init. }; public: Index: lib/TableGen/TGParser.cpp =================================================================== --- lib/TableGen/TGParser.cpp +++ lib/TableGen/TGParser.cpp @@ -1759,7 +1759,7 @@ switch (Lex.getCode()) { default: return Result; case tgtok::l_brace: { - if (Mode == ParseNameMode || Mode == ParseForeachMode) + if (Mode == ParseNameMode) // This is the beginning of the object body. return Result; @@ -2062,7 +2062,7 @@ switch (Lex.getCode()) { default: TokError("Unknown token when expecting a range list"); return nullptr; case tgtok::l_square: { // '[' ValueList ']' - Init *List = ParseSimpleValue(nullptr, nullptr, ParseForeachMode); + Init *List = ParseSimpleValue(nullptr); ForeachListValue = dyn_cast(List); if (!ForeachListValue) { TokError("Expected a Value list");