diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-07-03 16:42:02 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-07-03 16:42:02 +0000 |
commit | 98137aa8c5c95356454610d88cae079602ca2bec (patch) | |
tree | f8d76c17fb51925bff29e77de30bca9db9523b04 | |
parent | d771b447e2bf44830b6887b3c9a9ec433fa311c5 (diff) | |
download | clang-98137aa8c5c95356454610d88cae079602ca2bec.tar.gz clang-98137aa8c5c95356454610d88cae079602ca2bec.tar.bz2 clang-98137aa8c5c95356454610d88cae079602ca2bec.tar.xz |
[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
-rwxr-xr-x | tools/scan-build/ccc-analyzer | 8 |
1 files changed, 4 insertions, 4 deletions
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'}; |