From c295914b7ad5a4bd626e85ee4b3563c0e42a93be Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 21 Aug 2006 02:04:43 +0000 Subject: 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 --- llvm/lib/Support/CommandLine.cpp | 2 +- llvm/lib/Support/GraphWriter.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index f7fbef6b728..069940162b4 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -31,7 +31,7 @@ using namespace llvm; using namespace cl; // Globals for name and overview of program -static const char *ProgramName = ""; +static const char *ProgramName = ""; static const char *ProgramOverview = 0; // This collects additional help to be printed. diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp index f3255d815c6..152261fbac6 100644 --- a/llvm/lib/Support/GraphWriter.cpp +++ b/llvm/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 -- cgit v1.2.3