From: Jordan Rose Date: Wed, 3 Jul 2013 16:42:02 +0000 (+0000) Subject: [scan-build] Log compiler invocation to stderr, not stdout. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98137aa8c5c95356454610d88cae079602ca2bec;p=clang [scan-build] Log compiler invocation to stderr, not stdout. This is important for preprocessing steps, which may output to stdout. Also, change ENV accesses using barewords to use string keys instead. PR16414 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185555 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index 60b0185e6f..7c41a0566d 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -427,8 +427,8 @@ my %Uniqued; # Forward arguments to gcc. my $Status = system($Compiler,@ARGV); -if (defined $ENV{'CCC_ANALYZER_LOG'}) { - print "$Compiler @ARGV\n"; +if (defined $ENV{'CCC_ANALYZER_LOG'}) { + print STDERR "$Compiler @ARGV\n"; } if ($Status) { exit($Status >> 8); } @@ -453,8 +453,8 @@ if (!defined $OutputFormat) { $OutputFormat = "html"; } # Determine the level of verbosity. my $Verbose = 0; -if (defined $ENV{CCC_ANALYZER_VERBOSE}) { $Verbose = 1; } -if (defined $ENV{CCC_ANALYZER_LOG}) { $Verbose = 2; } +if (defined $ENV{'CCC_ANALYZER_VERBOSE'}) { $Verbose = 1; } +if (defined $ENV{'CCC_ANALYZER_LOG'}) { $Verbose = 2; } # Get the HTML output directory. my $HtmlDir = $ENV{'CCC_ANALYZER_HTML'};