]> granicus.if.org Git - clang/commitdiff
ccc: Print -### output on stderr to match gcc.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 11 Jan 2009 22:03:55 +0000 (22:03 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 11 Jan 2009 22:03:55 +0000 (22:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62052 91177308-0d34-0410-b5e6-96231b3b80d8

tools/ccc/ccclib/Driver.py
tools/ccc/test/ccc/Xarch.c
tools/ccc/test/ccc/integrated-cpp.c

index 53a4c22dc262b514bddf24000ae347501e552217..b9aba39f31a427fc514ebfc2adcdd8af6a533e00 100644 (file)
@@ -144,11 +144,11 @@ class Driver(object):
             self.claim(hasHashHashHash)
             for j in jobs.iterjobs():
                 if isinstance(j, Jobs.Command):
-                    print '"%s"' % '" "'.join(j.getArgv())
+                    print >>sys.stderr, '"%s"' % '" "'.join(j.getArgv())
                 elif isinstance(j, Jobs.PipedJob):
                     for c in j.commands:
-                        print '"%s" %c' % ('" "'.join(c.getArgv()),
-                                           "| "[c is j.commands[-1]])
+                        print >>sys.stderr, '"%s" %c' % ('" "'.join(c.getArgv()),
+                                                         "| "[c is j.commands[-1]])
                 elif not isinstance(j, JobList):
                     raise ValueError,'Encountered unknown job.'
             sys.exit(0)
@@ -308,6 +308,10 @@ class Driver(object):
                 # that other code which needs to know the inputs
                 # handles this properly. Best not to try and lipo
                 # this, for example.
+                #
+                # FIXME: Actually, this is just flat out broken, the
+                # tools expect inputs to be accessible by .getValue
+                # but that of course only yields the argument.
                 inputs.append((Types.ObjectType, a))
             elif a.opt is self.parser.xOption:
                 self.claim(a)
index 55014a757c7b256ef9b4c26ccd93e316b0dbcb06..06dae74d475a5cb313bb81f2c48dda87480962d7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: xcc -### -fsyntax-only -Xarch_i386 -Wall -Xarch_ppc -Wunused -arch i386 -arch ppc %s > %t &&
+// RUN: xcc -### -fsyntax-only -Xarch_i386 -Wall -Xarch_ppc -Wunused -arch i386 -arch ppc %s &> %t &&
 // RUN: grep '"-Xarch"' %t | count 0 &&
 // RUN: grep '"-Wall"' %t | count 1 &&
 // RUN: grep '"-arch" "i386"' %t | count 1 &&
index 47508610d9ec1fdc23818425f1454d34e0f0d0c2..56c7764fdfd5740be7b28d455aadd68e8defb1ad 100644 (file)
@@ -1,3 +1,3 @@
-// RUN: xcc -fsyntax-only -### %s | count 1 &&
-// RUN: xcc -fsyntax-only -### %s -no-integrated-cpp | count 2 &&
-// RUN: xcc -fsyntax-only -### %s -save-temps | count 2
+// RUN: xcc -fsyntax-only -### %s 2>&1 | count 1 &&
+// RUN: xcc -fsyntax-only -### %s -no-integrated-cpp 2>&1 | count 2 &&
+// RUN: xcc -fsyntax-only -### %s -save-temps 2>&1 | count 2