Bug fix: when copying prefix files using 'cp', don't split file names by spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52899 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer
index 1014188..e7b74c0 100755
--- a/utils/ccc-analyzer
+++ b/utils/ccc-analyzer
@@ -47,6 +47,17 @@
if language.rfind("c++") >= 0:
return
+ RunAnalyzer = 0;
+
+ if language.find("header") > 0:
+ target = remove_pch_extension(output)
+ command = ['cp']
+ args = command + files + [ target ]
+ else:
+ command = clang.split() + analysis_type.split()
+ args = command + args;
+ RunAnalyzer = 1
+
print_args = []
if verbose:
@@ -58,17 +69,6 @@
print_args.append(''.join([ '\'', args[i], '\'' ]))
i += 1
- RunAnalyzer = 0;
-
- if language.find("header") > 0:
- target = remove_pch_extension(output)
- command = 'cp'.split()
- args = command + files + target.split()
- else:
- command = clang.split() + analysis_type.split()
- args = command + args;
- RunAnalyzer = 1
-
if verbose == 2:
print >> sys.stderr, '#SHELL (cd ' + os.getcwd() + ' && ' + ' '.join(command + print_args) + ')\n'