From 25abc215dfba34aa62a95f4dee75c9b459a4eb67 Mon Sep 17 00:00:00 2001 From: Nico Cesar Date: Wed, 4 Jun 2014 21:27:29 -0400 Subject: [PATCH] make life easier for Makefiles --- lllc/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lllc/main.cpp b/lllc/main.cpp index e304cb5c3..be4ea8c01 100644 --- a/lllc/main.cpp +++ b/lllc/main.cpp @@ -98,7 +98,7 @@ int main(int argc, char** argv) vector errors; if (src.empty()) - cerr << "Empty file." << endl; + errors.push_back("Empty file."); else if (mode == Disassemble) { cout << disassemble(fromHex(src)) << endl; @@ -117,6 +117,7 @@ int main(int argc, char** argv) cout << compileLLLToAsm(src, optimise ? true : false, &errors) << endl; for (auto const& i: errors) cerr << i << endl; - + if ( errors.size() ) + return 1; return 0; }