diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-23 22:53:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 22:53:53 +0000 |
commit | 40ef79d5e24d0a66345b4c9a1b97952478850d42 (patch) | |
tree | 68223a691fe68fc69a8b7d8d0737d549dfd53877 /lib/Support/GraphWriter.cpp | |
parent | 3bc14202abb27a256e9aa05e697a792b679cdb16 (diff) | |
download | external_llvm-40ef79d5e24d0a66345b4c9a1b97952478850d42.zip external_llvm-40ef79d5e24d0a66345b4c9a1b97952478850d42.tar.gz external_llvm-40ef79d5e24d0a66345b4c9a1b97952478850d42.tar.bz2 |
fix some problems with my last patch which happen when one of
(HAVE_GV && (HAVE_DOT || HAVE_FDP || HAVE_NEATO || \
HAVE_TWOPI || HAVE_CIRCO))
are true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/GraphWriter.cpp')
-rw-r--r-- | lib/Support/GraphWriter.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp index a3d2d6c..91a7bb3 100644 --- a/lib/Support/GraphWriter.cpp +++ b/lib/Support/GraphWriter.cpp @@ -95,29 +95,24 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait, // Find which program the user wants #if HAVE_DOT - if (program == GraphProgram::DOT) { + if (program == GraphProgram::DOT) prog = sys::Path(LLVM_PATH_DOT); - } #endif #if (HAVE_FDP) - if (program == GraphProgram::FDP) { + if (program == GraphProgram::FDP) prog = sys::Path(LLVM_PATH_FDP); - } #endif #if (HAVE_NEATO) - if (program == GraphProgram::NEATO) { + if (program == GraphProgram::NEATO) prog = sys::Path(LLVM_PATH_NEATO); - } #endif #if (HAVE_TWOPI) - if (program == GraphProgram::TWOPI) { + if (program == GraphProgram::TWOPI) prog = sys::Path(LLVM_PATH_TWOPI); - } #endif #if (HAVE_CIRCO) - if (program == GraphProgram::CIRCO) { + if (program == GraphProgram::CIRCO) prog = sys::Path(LLVM_PATH_CIRCO); - } #endif std::vector<const char*> args; @@ -132,8 +127,9 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait, errs() << "Running '" << prog << "' program... "; - if (sys::Program::ExecuteAndWait(prog, &args[0],0,0,0,0,&ErrMsg)) { - errs() << "Error viewing graph " << Filename << ": '" << ErrMsg << "\n"; + if (sys::Program::ExecuteAndWait(prog, &args[0], 0, 0, 0, 0, &ErrMsg)) { + errs() << "Error viewing graph " << Filename.str() << ": '" + << ErrMsg << "\n"; } else { errs() << " done. \n"; @@ -153,7 +149,7 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait, } else { sys::Program::ExecuteNoWait(gv, &args[0],0,0,0,&ErrMsg); - errs() << "Remember to erase graph files: " << Filename << " " + errs() << "Remember to erase graph files: " << Filename.str() << " " << PSFilename << "\n"; } } @@ -167,7 +163,8 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait, errs() << "Running 'dotty' program... "; if (sys::Program::ExecuteAndWait(dotty, &args[0],0,0,0,0,&ErrMsg)) { - errs() << "Error viewing graph " << Filename << ": " << ErrMsg << "\n"; + errs() << "Error viewing graph " << Filename.str() << ": " + << ErrMsg << "\n"; } else { #ifdef __MINGW32__ // Dotty spawns another app and doesn't wait until it returns return; |