summaryrefslogtreecommitdiffstats
path: root/clang/utils/scan-build
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-06-30 18:18:16 +0000
committerTed Kremenek <kremenek@apple.com>2008-06-30 18:18:16 +0000
commit51a685cf270ef7d49db47cd718689fbf0037255a (patch)
tree18e98946d2a544356334892033ed3f48e2b7140f /clang/utils/scan-build
parent4be1c150e48bbd7e3e24c874c1f5a4fd715b8afb (diff)
downloadbcm5719-llvm-51a685cf270ef7d49db47cd718689fbf0037255a.tar.gz
bcm5719-llvm-51a685cf270ef7d49db47cd718689fbf0037255a.zip
When inspecting the build command, strip off the preceding path to the build command.
llvm-svn: 52913
Diffstat (limited to 'clang/utils/scan-build')
-rwxr-xr-xclang/utils/scan-build5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/utils/scan-build b/clang/utils/scan-build
index e305ee50a7e..f881cc8ea67 100755
--- a/clang/utils/scan-build
+++ b/clang/utils/scan-build
@@ -534,6 +534,11 @@ sub RunBuildCommand {
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;
OpenPOWER on IntegriCloud