summaryrefslogtreecommitdiff
path: root/tools/llvmc2/llvmc.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-05-12 16:31:42 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-05-12 16:31:42 +0000
commita6730370974c6db60e2ddeee630271cae03c6c4d (patch)
treebd4d0443cf023a9e372cc311e9282cb7be4f6ca0 /tools/llvmc2/llvmc.cpp
parent2ce3898e410e2b9c155d52fb42a6614eadafca9e (diff)
downloadllvm-a6730370974c6db60e2ddeee630271cae03c6c4d.tar.gz
llvm-a6730370974c6db60e2ddeee630271cae03c6c4d.tar.bz2
llvm-a6730370974c6db60e2ddeee630271cae03c6c4d.tar.xz
Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc2/llvmc.cpp')
-rw-r--r--tools/llvmc2/llvmc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/llvmc2/llvmc.cpp b/tools/llvmc2/llvmc.cpp
index 4eeb627169..a749274543 100644
--- a/tools/llvmc2/llvmc.cpp
+++ b/tools/llvmc2/llvmc.cpp
@@ -15,6 +15,7 @@
//===----------------------------------------------------------------------===//
#include "CompilationGraph.h"
+#include "Error.h"
#include "Tool.h"
#include "llvm/System/Path.h"
@@ -92,6 +93,9 @@ int main(int argc, char** argv) {
return BuildTargets(graph);
}
+ catch(llvmc::error_code& ec) {
+ return ec.code();
+ }
catch(const std::exception& ex) {
std::cerr << ex.what() << '\n';
}