From 3b3d2e2c3a34e852579ba77e5b9d5be49d83bd03 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Wed, 4 Jun 2014 04:11:12 +0000 Subject: [PATCH] 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 --- lib/Support/GraphWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;