[cfe-commits] r49213 - in /cfe/trunk/utils: ccc ccc-analyzer
Seo Sanghyeon
sanxiyn at gmail.com
Fri Apr 4 04:02:38 PDT 2008
Author: sanxiyn
Date: Fri Apr 4 06:02:21 2008
New Revision: 49213
URL: http://llvm.org/viewvc/llvm-project?rev=49213&view=rev
Log:
- ccc: print generated command line to stdout instead of stderr
- ccc: quote shell metacharacters in command line to ease copy-and-paste
Modified:
cfe/trunk/utils/ccc
cfe/trunk/utils/ccc-analyzer
Modified: cfe/trunk/utils/ccc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc?rev=49213&r1=49212&r2=49213&view=diff
==============================================================================
--- cfe/trunk/utils/ccc (original)
+++ cfe/trunk/utils/ccc Fri Apr 4 06:02:21 2008
@@ -18,8 +18,13 @@
print >> sys.stderr, 'ccc: ' + message
sys.exit(1)
+def quote(arg):
+ if '"' in arg:
+ return repr(arg)
+ return arg
+
def run(args):
- print >> sys.stderr, ' '.join(args)
+ print ' '.join(map(quote, args))
code = subprocess.call(args)
if code > 255:
code = 1
Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=49213&r1=49212&r2=49213&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Fri Apr 4 06:02:21 2008
@@ -21,9 +21,14 @@
print >> sys.stderr, 'ccc: ' + message
sys.exit(1)
+def quote(arg):
+ if '"' in arg:
+ return repr(arg)
+ return arg
+
def run(args):
- print >> sys.stderr, ' '.join(args)
- print >> sys.stderr, '\n'
+ print ' '.join(map(quote, args))
+ print
code = subprocess.call(args)
if code > 255:
code = 1
More information about the cfe-commits
mailing list