aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-07 23:27:54 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-07 23:27:54 +0000
commit6e9d38e2b84653d1e61b19df2a7b4430d5898ca7 (patch)
treef49bc2bce6012399dfc8223ed4507af5d5c436bb
parente2563ca02a519c2ad6d64dfed87d6e86c5d3c072 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49355 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/ccc-analyzer14
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer
index fe315f6df0..038032f2dc 100755
--- a/utils/ccc-analyzer
+++ b/utils/ccc-analyzer
@@ -27,8 +27,10 @@ def quote(arg):
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 @@ def preprocess(args):
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 @@ def analyze(args,language,output,files,verbose,htmldir):
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 @@ def analyze(args,language,output,files,verbose,htmldir):
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'