[cfe-commits] r62811 - in /cfe/trunk/tools/ccc: ccclib/Driver.py	test/ccc/universal-hello.c
    Daniel Dunbar 
    daniel at zuster.org
       
    Thu Jan 22 15:19:32 PST 2009
    
    
  
Author: ddunbar
Date: Thu Jan 22 17:19:32 2009
New Revision: 62811
URL: http://llvm.org/viewvc/llvm-project?rev=62811&view=rev
Log:
ccc: Bug fix, driver logic was allowing child jobs to pipe output when
parent wasn't expecting it.
Modified:
    cfe/trunk/tools/ccc/ccclib/Driver.py
    cfe/trunk/tools/ccc/test/ccc/universal-hello.c
Modified: cfe/trunk/tools/ccc/ccclib/Driver.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Driver.py?rev=62811&r1=62810&r2=62811&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Driver.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Driver.py Thu Jan 22 17:19:32 2009
@@ -672,8 +672,8 @@
                     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 @@
 
             # 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
Modified: cfe/trunk/tools/ccc/test/ccc/universal-hello.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/test/ccc/universal-hello.c?rev=62811&r1=62810&r2=62811&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/test/ccc/universal-hello.c (original)
+++ cfe/trunk/tools/ccc/test/ccc/universal-hello.c Thu Jan 22 17:19:32 2009
@@ -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
 
    
    
More information about the cfe-commits
mailing list