mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32879 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aae58841c6
commit
b9240544d7
@ -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
Block a user