ccc: Bug fix, driver logic was allowing child jobs to pipe output when

parent wasn't expecting it.

llvm-svn: 62811
This commit is contained in:
Daniel Dunbar 2009-01-22 23:19:32 +00:00
parent d8aea2dba8
commit 2e1cfd0267
2 changed files with 6 additions and 3 deletions

View File

@ -672,8 +672,8 @@ class Driver(object):
inputList = phase.inputs[0].inputs
# Only try to use pipes when exactly one input.
canAcceptPipe = len(inputList) == 1 and tool.acceptsPipedInput()
inputs = [createJobs(tc, p, canAcceptPipe, False,
attemptToPipeInput = len(inputList) == 1 and tool.acceptsPipedInput()
inputs = [createJobs(tc, p, attemptToPipeInput, False,
arch, tcArgs, linkingOutput)
for p in inputList]
@ -694,7 +694,7 @@ class Driver(object):
# Figure out where to put the job (pipes).
jobList = jobs
if canAcceptPipe and isinstance(inputs[0].source, Jobs.PipedJob):
if isinstance(inputs[0].source, Jobs.PipedJob):
jobList = inputs[0].source
baseInput = inputs[0].baseInput

View File

@ -1,6 +1,9 @@
// RUN: xcc -arch ppc -arch i386 -arch x86_64 %s -o %t &&
// RUN: %t | grep "Hello, World" &&
// RUN: xcc -pipe -arch ppc -arch i386 -arch x86_64 %s -o %t &&
// RUN: %t | grep "Hello, World" &&
// Check that multiple archs are handled properly.
// RUN: xcc -ccc-print-phases -### -arch ppc -arch ppc %s | grep linker- | count 1