From 318d95a01c63460d78f224346f52d731f56d4671 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 17 Jan 2015 17:55:27 -0800
Subject: [PATCH 1003/1008] MacPorts Only: Fix name of scan-view executable
 inside scan-build

http://trac.macports.org/ticket/35006

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 tools/scan-build/scan-build | 2 ++
 1 file changed, 2 insertions(+)

diff --git llvm_release_37/tools/clang/tools/scan-build/scan-build macports_release_37/tools/clang/tools/scan-build/scan-build
index d7cadc3..9fd4e2a 100755
--- llvm_release_37/tools/clang/tools/scan-build/scan-build
+++ macports_release_37/tools/clang/tools/scan-build/scan-build
@@ -1711,6 +1711,8 @@ if (defined $OutputFormat) {
       Diag "Analysis run complete.\n";
       Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";
       my $ScanView = Cwd::realpath("$RealBin/scan-view");
+      if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/bin/scan-view"); }
+      if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../scan-view/scan-view"); }
       if (! -x $ScanView) { $ScanView = "scan-view"; }
       exec $ScanView, "$HtmlDir";
     }
-- 
2.10.1

