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.
llvm-svn: 29785
diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp
index f3255d8..152261f 100644
--- a/llvm/lib/Support/GraphWriter.cpp
+++ b/llvm/lib/Support/GraphWriter.cpp
@@ -59,7 +59,9 @@
args.push_back(PSFilename.c_str());
args.push_back(0);
- sys::Program::ExecuteAndWait(gv, &args[0]);
+ if (sys::Program::ExecuteAndWait(gv, &args[0])) {
+ std::cerr << "Error viewing graph: 'gv' not in path?\n";
+ }
}
PSFilename.eraseFromDisk();
#elif HAVE_DOTTY