summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/Main.cpp')
-rw-r--r--llvm/lib/TableGen/Main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp
index e1cd6237832..dc4167b305c 100644
--- a/llvm/lib/TableGen/Main.cpp
+++ b/llvm/lib/TableGen/Main.cpp
@@ -117,11 +117,14 @@ int TableGenMain(char *argv0, TableGenMainFn *MainFn) {
if (MainFn(Out.os(), Records))
return 1;
+ if (ErrorsPrinted > 0) {
+ errs() << argv0 << ": " << ErrorsPrinted << " errors.\n";
+ return 1;
+ }
+
// Declare success.
Out.keep();
return 0;
-
- return 1;
}
}
OpenPOWER on IntegriCloud