diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/GraphWriter.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/System/Unix/Program.inc | 2 |
3 files changed, 5 insertions, 3 deletions
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 = "<unknown>"; +static const char *ProgramName = "<premain>"; 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 diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc index 1bf1bc91f81..c3d5d5ce6e5 100644 --- a/llvm/lib/System/Unix/Program.inc +++ b/llvm/lib/System/Unix/Program.inc @@ -108,7 +108,7 @@ Program::ExecuteAndWait(const Path& path, unsigned secondsToWait ) { if (!path.canExecute()) - throw path.toString() + " is not executable"; + return -9999; #ifdef HAVE_SYS_WAIT_H // Create a child process. |