For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp
index df4f470..0ac514b 100644
--- a/tools/bugpoint/OptimizerDriver.cpp
+++ b/tools/bugpoint/OptimizerDriver.cpp
@@ -194,6 +194,8 @@
       std::cout << "Success!\n";
     else if (result > 0)
       std::cout << "Exited with error code '" << result << "'\n";
+    else if (result == -9999)
+      std::cout << "Program not executable\n";
     else if (result < 0)
       std::cout << "Crashed with signal #" << abs(result) << "\n";
     if (result & 0x01000000)