[PATCH] D55198: Python 2/3 compat - type destructuring

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 04:44:40 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL348129: Portable Python script across Python version (authored by serge_sans_paille, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D55198?vs=176339&id=176365#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55198/new/

https://reviews.llvm.org/D55198

Files:
  cfe/trunk/utils/ABITest/Enumeration.py
  cfe/trunk/utils/ABITest/TypeGen.py


Index: cfe/trunk/utils/ABITest/TypeGen.py
===================================================================
--- cfe/trunk/utils/ABITest/TypeGen.py
+++ cfe/trunk/utils/ABITest/TypeGen.py
@@ -99,7 +99,8 @@
                             ' '.join(map(getField, self.fields)))
 
     def getTypedefDef(self, name, printer):
-        def getField((i, t)):
+        def getField(it):
+            i, t = it
             if t.isBitField():
                 if t.isPaddingBitField():
                     return '%s : 0;'%(printer.getTypeName(t),)
Index: cfe/trunk/utils/ABITest/Enumeration.py
===================================================================
--- cfe/trunk/utils/ABITest/Enumeration.py
+++ cfe/trunk/utils/ABITest/Enumeration.py
@@ -46,7 +46,8 @@
 def base(line):
     return line*(line+1)//2
 
-def pairToN((x,y)):
+def pairToN(pair):
+    x,y = pair
     line,index = x+y,y
     return base(line)+index
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55198.176365.patch
Type: text/x-patch
Size: 918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181203/a0545014/attachment.bin>


More information about the llvm-commits mailing list