]> granicus.if.org Git - clang/commitdiff
[scan-build] Log compiler invocation to stderr, not stdout.
authorJordan Rose <jordan_rose@apple.com>
Wed, 3 Jul 2013 16:42:02 +0000 (16:42 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 3 Jul 2013 16:42:02 +0000 (16:42 +0000)
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

tools/scan-build/ccc-analyzer

index 60b0185e6fb1801232ec5862d62a8fd73797efdb..7c41a0566d5b7747e0eca4c5e9c09bb059cdfc8a 100755 (executable)
@@ -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'};