ccc: Refactor so that all accesses to actual input strings go through
the ArgList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61844 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index aa617c6..a8aab6c 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -104,10 +104,10 @@
self.claim(hasHashHashHash)
for j in jobs.iterjobs():
if isinstance(j, Jobs.Command):
- print '"%s"' % '" "'.join(j.render(argv))
+ print '"%s"' % '" "'.join(j.render(args))
elif isinstance(j, Jobs.PipedJob):
for c in j.commands:
- print '"%s" %c' % ('" "'.join(c.render(argv)),
+ print '"%s" %c' % ('" "'.join(c.render(args)),
"| "[c is j.commands[-1]])
elif not isinstance(j, JobList):
raise ValueError,'Encountered unknown job.'
@@ -115,7 +115,7 @@
for j in jobs.iterjobs():
if isinstance(j, Jobs.Command):
- cmd_args = j.render(argv)
+ cmd_args = j.render(args)
res = os.spawnvp(os.P_WAIT, cmd_args[0], cmd_args)
if res:
sys.exit(res)