aboutsummaryrefslogtreecommitdiff
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
commit3301cb103d5f32056d62f13bde036988f7cf1330 (patch)
treebd402eff2b434f3e5320cdfb9fa662b516263849
parente19f449661a7d7f31a2ef0f86d21c232e583608b (diff)
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
-rwxr-xr-xutils/scan-build5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/scan-build b/utils/scan-build
index e305ee50a7..f881cc8ea6 100755
--- a/utils/scan-build
+++ b/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;