[PATCH] D117030: [extract_symbols.py] Fix line-splitting of tool output.

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 01:08:10 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG42f90a28a32d: [extract_symbols.py] Fix line-splitting of tool output. (authored by simon_tatham).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117030

Files:
  llvm/utils/extract_symbols.py


Index: llvm/utils/extract_symbols.py
===================================================================
--- llvm/utils/extract_symbols.py
+++ llvm/utils/extract_symbols.py
@@ -111,7 +111,7 @@
 def objdump_is_32bit_windows(lib):
     output = subprocess.check_output(['objdump','-f',lib],
                                      universal_newlines=True)
-    for line in output:
+    for line in output.splitlines():
         match = re.match('.+file format (\S+)', line)
         if match:
             return (match.group(1) == 'pe-i386')
@@ -120,7 +120,7 @@
 def readobj_is_32bit_windows(lib):
     output = subprocess.check_output(['llvm-readobj','--file-header',lib],
                                      universal_newlines=True)
-    for line in output:
+    for line in output.splitlines():
         match = re.match('Format: (\S+)', line)
         if match:
             return (match.group(1) == 'COFF-i386')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117030.399243.patch
Type: text/x-patch
Size: 917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/02bfd8ef/attachment.bin>


More information about the llvm-commits mailing list