From 745927242ac99516e9eb12305dc60d5511f392f4 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. llvm-svn: 210148 --- llvm/lib/Support/GraphWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp index a7bb4f2..306f3e8 100644 --- a/llvm/lib/Support/GraphWriter.cpp +++ b/llvm/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; -- 2.7.4