[llvm-commits] [llvm] r159580 - /llvm/trunk/utils/lit/lit/ShUtil.py

Chandler Carruth chandlerc at gmail.com
Mon Jul 2 13:43:21 PDT 2012


Author: chandlerc
Date: Mon Jul  2 15:43:21 2012
New Revision: 159580

URL: http://llvm.org/viewvc/llvm-project?rev=159580&view=rev
Log:
Revert r159528 which taught lit's builtin shell test runner about the
'|&' bash syntax. We have lots of users with a bash on their system
which doesn't support this syntax, and as bash is still significantly
faster, we should support them.

The test suite has already been updated to cope with this.

Modified:
    llvm/trunk/utils/lit/lit/ShUtil.py

Modified: llvm/trunk/utils/lit/lit/ShUtil.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ShUtil.py?rev=159580&r1=159579&r2=159580&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/ShUtil.py (original)
+++ llvm/trunk/utils/lit/lit/ShUtil.py Mon Jul  2 15:43:21 2012
@@ -134,8 +134,6 @@
         if c == '|':
             if self.maybe_eat('|'):
                 return ('||',)
-            if self.maybe_eat('&'):
-                return ('|&',)
             return (c,)
         if c == '&':
             if self.maybe_eat('&'):
@@ -207,7 +205,7 @@
 
             # Otherwise see if it is a terminator.
             assert isinstance(tok, tuple)
-            if tok[0] in ('|','|&',';','&','||','&&'):
+            if tok[0] in ('|',';','&','||','&&'):
                 break
             
             # Otherwise it must be a redirection.
@@ -226,18 +224,9 @@
             negate = True
 
         commands = [self.parse_command()]
-        while 1:
-            tok = self.look()
-            if tok == ('|',):
-              self.lex()
-              commands.append(self.parse_command())
-              continue
-            if tok == ('|&',):
-              self.lex()
-              commands[-1].redirects.insert(0, (('>&',2),'1'))
-              commands.append(self.parse_command())
-              continue
-            break
+        while self.look() == ('|',):
+            self.lex()
+            commands.append(self.parse_command())
         return Pipeline(commands, negate)
             
     def parse(self):





More information about the llvm-commits mailing list