[cfe-commits] r49355 - /cfe/trunk/utils/ccc-analyzer
Ted Kremenek
kremenek at apple.com
Mon Apr 7 16:27:54 PDT 2008
Author: kremenek
Date: Mon Apr 7 18:27:54 2008
New Revision: 49355
URL: http://llvm.org/viewvc/llvm-project?rev=49355&view=rev
Log:
Fix analyzer breakage introduced by r49213: http://llvm.org/viewvc/llvm-project?rev=49213&view=rev
The problem is that some clients of gcc lookout at the stdout output of gcc;
this requires that all the analyzer diagnostics go to stderr to avoid polluting
stdout.
Modified:
cfe/trunk/utils/ccc-analyzer
Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=49355&r1=49354&r2=49355&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Mon Apr 7 18:27:54 2008
@@ -27,8 +27,10 @@
return arg
def run(args):
- print ' '.join(map(quote, args))
- print
+ # We MUST print to stderr. Some clients use the stdout output of
+ # gcc for various purposes.
+ print >> sys.stderr, ' '.join(map(quote, args))
+ print >> sys.stderr
code = subprocess.call(args)
if code > 255:
code = 1
@@ -40,6 +42,8 @@
run(command + args)
def compile(args):
+ # We MUST print to stderr. Some clients use the stdout output of
+ # gcc for various purposes.
print >> sys.stderr, '\n'
command = 'gcc'.split()
run(command + args)
@@ -57,6 +61,8 @@
print_args = []
if verbose:
+ # We MUST print to stderr. Some clients use the stdout output of
+ # gcc for various purposes.
print >> sys.stderr, ' '.join(['\n[LOCATION]:', os.getcwd(), '\n' ])
i = 0
while i < len(args):
@@ -77,7 +83,9 @@
args.append(htmldir)
print_args.append(htmldir)
- if verbose:
+ if verbose:
+ # We MUST print to stderr. Some clients use the stdout output of
+ # gcc for various purposes.
print >> sys.stderr, ' '.join(command+print_args)
print >> sys.stderr, '\n'
More information about the cfe-commits
mailing list