From: Alp Toker Date: Wed, 4 Jun 2014 04:11:12 +0000 (+0000) Subject: GraphWriter: try gv before xdg-open X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3b3d2e2c3a34e852579ba77e5b9d5be49d83bd03;p=oota-llvm.git GraphWriter: try gv before xdg-open Avoid changing behaviour for everyone who's used to the traditional ghostview UI, especially since it knows how to stay in the foreground unlike xdg-open. Amendment to r210147. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210148 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp index a7bb4f26a58..306f3e89d0d 100644 --- a/lib/Support/GraphWriter.cpp +++ b/lib/Support/GraphWriter.cpp @@ -170,10 +170,10 @@ bool llvm::DisplayGraph(StringRef FilenameRef, bool wait, if (!PSViewer && S.TryFindProgram("open", ViewerPath)) PSViewer = PSV_OSXOpen; #endif - if (!PSViewer && S.TryFindProgram("xdg-open", ViewerPath)) - PSViewer = PSV_XDGOpen; if (!PSViewer && S.TryFindProgram("gv", ViewerPath)) PSViewer = PSV_Ghostview; + if (!PSViewer && S.TryFindProgram("xdg-open", ViewerPath)) + PSViewer = PSV_XDGOpen; // PostScript graph generator + PostScript viewer std::string GeneratorPath;