[cfe-commits] r51012 - /cfe/trunk/utils/ccc-analyzer
Ted Kremenek
kremenek at apple.com
Mon May 12 16:47:41 PDT 2008
Author: kremenek
Date: Mon May 12 18:47:41 2008
New Revision: 51012
URL: http://llvm.org/viewvc/llvm-project?rev=51012&view=rev
Log:
Directly invoke gcc immediately instead of before we process the command line arguments.
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=51012&r1=51011&r2=51012&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Mon May 12 18:47:41 2008
@@ -29,8 +29,8 @@
def run(args):
# 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
+ #print >> sys.stderr, ' '.join(map(quote, args))
+ #print >> sys.stderr
code = subprocess.call(args)
if code > 255:
code = 1
@@ -40,7 +40,7 @@
def compile(args):
# We MUST print to stderr. Some clients use the stdout output of
# gcc for various purposes.
- print >> sys.stderr, '\n'
+ #print >> sys.stderr, '\n'
command = 'gcc'.split()
run(command + args)
@@ -94,7 +94,7 @@
print >> sys.stderr, '\n'
- subprocess.call(args)
+# subprocess.call(args)
def link(args):
command = 'gcc'.split()
@@ -138,9 +138,11 @@
language = ''
verbose = 0
- clang = "clang"
-
+ clang = "clang"
+ # Forward to GCC.
+ compile(args)
+
if os.environ.get('CCC_ANALYZER_VERBOSE') is not None:
verbose = 1
@@ -247,8 +249,8 @@
if not files:
error('no input files')
- if action == 'preprocess' or save_temps:
- compile(args)
+ # if action == 'preprocess' or save_temps:
+ # compile(args)
if action == 'compile' or save_temps:
for i, file in enumerate(files):
@@ -267,12 +269,12 @@
analyze_args = analyze_args + [ '-x', language ]
analyze_args = analyze_args + compile_opts
analyze(clang, analyze_args, language, output, files, verbose, htmldir)
- compile(args)
+# compile(args)
- if action == 'link':
- link(args)
-# analyze(link_opts)
+# if action == 'link':
+# link(args)
+# # analyze(link_opts)
if __name__ == '__main__':
main(sys.argv[1:])
More information about the cfe-commits
mailing list