For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29791 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvmc/llvmc.cpp b/tools/llvmc/llvmc.cpp
index 496eaa4..f2e7c1f 100644
--- a/tools/llvmc/llvmc.cpp
+++ b/tools/llvmc/llvmc.cpp
@@ -355,9 +355,10 @@
     }
 
     // Tell the driver to do its thing
-    int result = CD->execute(InpList, sys::Path(OutputFilename));
+    std::string ErrMsg;
+    int result = CD->execute(InpList, sys::Path(OutputFilename), ErrMsg);
     if (result != 0) {
-      throw std::string("Error executing actions. Terminated.");
+      std::cerr << argv[0] << ": " << ErrMsg << '\n';
       return result;
     }