summaryrefslogtreecommitdiff
path: root/lib/Support/GraphWriter.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-21 02:04:43 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-21 02:04:43 +0000
commit023fcf977660e686e04f5bef0e2a7321db47df7e (patch)
tree21e3b0af2281c2ede5c731f98d5c6cb22dd135a6 /lib/Support/GraphWriter.cpp
parent422fa625d9bdc37ebba9fc8ce16f141ffa80fc58 (diff)
downloadllvm-023fcf977660e686e04f5bef0e2a7321db47df7e.tar.gz
llvm-023fcf977660e686e04f5bef0e2a7321db47df7e.tar.bz2
llvm-023fcf977660e686e04f5bef0e2a7321db47df7e.tar.xz
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
Diffstat (limited to 'lib/Support/GraphWriter.cpp')
-rw-r--r--lib/Support/GraphWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp
index f3255d815c..152261fbac 100644
--- a/lib/Support/GraphWriter.cpp
+++ b/lib/Support/GraphWriter.cpp
@@ -59,7 +59,9 @@ void llvm::DisplayGraph(const sys::Path &Filename) {
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