If we hit a parse error, emit something bad to the output stream. This ensures that
llvm-upgrade < foo | llvm-as | llvm-dis will fail if llvm-upgrade fails. llvm-svn: 32879
This commit is contained in:
parent
8392ed123a
commit
a0058929bc
|
@ -72,6 +72,7 @@ void UpgradeAssembly(const std::string &infile, std::istream& in,
|
|||
|
||||
if (yyparse()) {
|
||||
std::cerr << "Parse failed.\n";
|
||||
out << "llvm-upgrade parse failed.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -1597,5 +1598,6 @@ int yyerror(const char *ErrorMsg) {
|
|||
else
|
||||
errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
|
||||
std::cerr << "llvm-upgrade: " << errMsg << '\n';
|
||||
*O << "llvm-upgrade parse failed.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue