From ffba8580c1deb7d8fa1b1c2bb8484b9a84eab0b0 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Wed, 8 Feb 2012 19:52:49 -0800 Subject: [PATCH] Make sure that non-zero exit code is returned when input file not found. Fixes issue #174. --- module.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module.cpp b/module.cpp index acf57a90..e192c39d 100644 --- a/module.cpp +++ b/module.cpp @@ -1625,6 +1625,9 @@ Module::CompileAndOutput(const char *srcFile, const char *arch, const char *cpu, if (!m->writeOutput(Module::Header, headerFileName)) return 1; } + else + ++m->errorCount; + int errorCount = m->errorCount; delete m; m = NULL;