From 644801a199794a74bdc4655f6af5bc05f8153dc8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 5 Oct 2010 15:30:27 +0000 Subject: [PATCH] After printing "Running 'Graphviz' program... " and running the Graphviz program, print something with a newline, to avoid leaving the line unfinished. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115620 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/GraphWriter.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp index e87cebf289f..2e9278d8dee 100644 --- a/lib/Support/GraphWriter.cpp +++ b/lib/Support/GraphWriter.cpp @@ -63,11 +63,13 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait, args.push_back(0); errs() << "Running 'Graphviz' program... "; - if (sys::Program::ExecuteAndWait(Graphviz, &args[0],0,0,0,0,&ErrMsg)) + if (sys::Program::ExecuteAndWait(Graphviz, &args[0],0,0,0,0,&ErrMsg)) { errs() << "Error viewing graph " << Filename.str() << ": " << ErrMsg << "\n"; - else - Filename.eraseFromDisk(); + return; + } + Filename.eraseFromDisk(); + errs() << " done. \n"; #elif HAVE_XDOT_PY std::vector args; @@ -87,11 +89,13 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait, errs() << "Running 'xdot.py' program... "; if (sys::Program::ExecuteAndWait(sys::Path(LLVM_PATH_XDOT_PY), - &args[0],0,0,0,0,&ErrMsg)) + &args[0],0,0,0,0,&ErrMsg)) { errs() << "Error viewing graph " << Filename.str() << ": " << ErrMsg << "\n"; - else - Filename.eraseFromDisk(); + return; + } + Filename.eraseFromDisk(); + errs() << " done. \n"; #elif (HAVE_GV && (HAVE_DOT || HAVE_FDP || HAVE_NEATO || \ HAVE_TWOPI || HAVE_CIRCO)) -- 2.34.1