]> granicus.if.org Git - clang/commitdiff
ccc: Bug fix, driver logic was allowing child jobs to pipe output when
authorDaniel Dunbar <daniel@zuster.org>
Thu, 22 Jan 2009 23:19:32 +0000 (23:19 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 22 Jan 2009 23:19:32 +0000 (23:19 +0000)
parent wasn't expecting it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62811 91177308-0d34-0410-b5e6-96231b3b80d8

tools/ccc/ccclib/Driver.py
tools/ccc/test/ccc/universal-hello.c

index 3452ed173b23874b7cf8c7b3fff283ad46d07610..2ba1cf6cd80c481347ebf3863a1ed8f343d9e05f 100644 (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
index 8d4b3e336465199e2b943f0a5beb6e173ea41fd0..7702b38229c2dc91458a548bedf2fbece0d883a0 100644 (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