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

llvm-svn: 52913
This commit is contained in:
Ted Kremenek 2008-06-30 18:18:16 +00:00
parent 4be1c150e4
commit 51a685cf27
1 changed files with 5 additions and 0 deletions

View File

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