Use the correct 'ccc-analyzer' when the build command is a direct invocation of gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51883 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/scan-build b/utils/scan-build
index 64419a3..e516c65 100755
--- a/utils/scan-build
+++ b/utils/scan-build
@@ -496,10 +496,11 @@
my $Args = shift;
my $IgnoreErrors = shift;
my $Cmd = $Args->[0];
+ my $CCAnalyzer = shift;
if ($Cmd eq "gcc" or $Cmd eq "cc" or $Cmd eq "llvm-gcc") {
shift @$Args;
- unshift @$Args, "ccc-analyzer"
+ unshift @$Args, $CCAnalyzer;
}
elsif ($IgnoreErrors) {
if ($Cmd eq "make" or $Cmd eq "gmake") {
@@ -715,7 +716,7 @@
# Run the build.
-RunBuildCommand(\@ARGV, $IgnoreErrors);
+RunBuildCommand(\@ARGV, $IgnoreErrors, $Cmd);
# Postprocess the HTML directory.