diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 54932487e8d..a9de4eac9d3 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -1734,7 +1734,10 @@ Init *TGParser::ParseDeclaration(Record *CurRec, Init *Val = ParseValue(CurRec, Type); if (!Val || SetValue(CurRec, ValLoc, DeclName, std::vector(), Val)) - return nullptr; + // Return the name, even if an error is thrown. This is so that we can + // continue to make some progress, even without the value having been + // initialized. + return DeclName; } return DeclName;