When inspecting the build command, strip off the preceding path to the build command.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52913 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/scan-build b/utils/scan-build
index e305ee5..f881cc8 100755
--- a/utils/scan-build
+++ b/utils/scan-build
@@ -534,6 +534,11 @@
   my $Cmd = $Args->[0];
   my $CCAnalyzer = shift;
   
+  # Get only the part of the command after the last '/'.
+  if ($Cmd =~ /\/([^\/]+)$/) {
+    $Cmd = $1;
+  }
+  
   if ($Cmd eq "gcc" or $Cmd eq "cc" or $Cmd eq "llvm-gcc") {
     shift @$Args;
     unshift @$Args, $CCAnalyzer;