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
This commit is contained in:
Alp Toker 2014-06-04 04:11:12 +00:00
parent a5bd2adbc7
commit 3b3d2e2c3a

View File

@ -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;