1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Don't fail tablegen immediately after failing to set a value.

Instead allow the variable to be declared, but don't attach an initializer. This allows more than a single error to be emitted before we exit.

Test case to follow soon in another patch.

llvm-svn: 214375
This commit is contained in:
Pete Cooper 2014-07-31 01:44:00 +00:00
parent fbba8abe2f
commit 0141b69686

View File

@ -1734,7 +1734,10 @@ Init *TGParser::ParseDeclaration(Record *CurRec,
Init *Val = ParseValue(CurRec, Type);
if (!Val ||
SetValue(CurRec, ValLoc, DeclName, std::vector<unsigned>(), 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;