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/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc
index 1bf1bc9..c3d5d5c 100644
--- a/lib/System/Unix/Program.inc
+++ b/lib/System/Unix/Program.inc
@@ -108,7 +108,7 @@
unsigned secondsToWait
) {
if (!path.canExecute())
- throw path.toString() + " is not executable";
+ return -9999;
#ifdef HAVE_SYS_WAIT_H
// Create a child process.