aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-upgrade
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-04 18:45:51 +0000
committerChris Lattner <sabre@nondot.org>2007-01-04 18:45:51 +0000
commitb9240544d7250ae17b7fc252909562d0a91ea01c (patch)
treed3a4730f53fcb7214264fbe5ebb8dc9ebb82b97d /tools/llvm-upgrade
parentaae58841c68de244d5f150952240a9ecaf23c799 (diff)
downloadexternal_llvm-b9240544d7250ae17b7fc252909562d0a91ea01c.zip
external_llvm-b9240544d7250ae17b7fc252909562d0a91ea01c.tar.gz
external_llvm-b9240544d7250ae17b7fc252909562d0a91ea01c.tar.bz2
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
Diffstat (limited to 'tools/llvm-upgrade')
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index f5e119d..2b3315d 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -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);
}