summaryrefslogtreecommitdiff
path: root/tools/llvmc2/llvmc.cpp
diff options
context:
space:
mode:
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';
}