From: Michael Kruse Date: Tue, 18 Aug 2015 12:13:57 +0000 (+0000) Subject: [Support] Always wait for GraphViz before opening the viewer X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=9ab9f8d9b8e3347c3620b25d6afb65a28d687810 [Support] Always wait for GraphViz before opening the viewer Summary: When calling DisplayGraph and a PS viewer is chosen, two programs are executed: The GraphViz generator and the PostScript viewer. Always for the generator to finish to ensure that the .ps file is written before opening the viewer for that file. DisplayGraph's wait parameter refers to whether to wait until the user closes the viewer. This happened on Windows and if none of the options to open the .dot file directly applies, also on Linux. Reviewers: Bigcheese, chandlerc, aaron.ballman Subscribers: dwiberg, aaron.ballman, llvm-commits Differential Revision: http://reviews.llvm.org/D11876 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245289 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp index a9b02204146..0bbfde232a1 100644 --- a/lib/Support/GraphWriter.cpp +++ b/lib/Support/GraphWriter.cpp @@ -219,7 +219,7 @@ bool llvm::DisplayGraph(StringRef FilenameRef, bool wait, errs() << "Running '" << GeneratorPath << "' program... "; - if (ExecGraphViewer(GeneratorPath, args, Filename, wait, ErrMsg)) + if (ExecGraphViewer(GeneratorPath, args, Filename, true, ErrMsg)) return true; args.clear();