[PATCH] D107112: [AIX] Include symbol alias in extract_symbols.py

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 18:38:15 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa09e93bfb820: [AIX] Include symbol alias in extract_symbols.py (authored by jsji).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107112

Files:
  llvm/utils/extract_symbols.py


Index: llvm/utils/extract_symbols.py
===================================================================
--- llvm/utils/extract_symbols.py
+++ llvm/utils/extract_symbols.py
@@ -53,7 +53,12 @@
     process.stdin.close()
     for line in process.stdout:
         # Look for external symbols that are defined in some section
-        match = re.match("^(\S+)\s+[BDGRSTVW]\s+\S+\s+\S+$", line)
+        # The POSIX format is:
+        #   name   type   value   size
+        # The -P flag displays the size field for symbols only when applicable,
+        # so the last field is optional. There's no space after the value field,
+        # but \s+ match newline also, so \s+\S* will match the optional size field.
+        match = re.match("^(\S+)\s+[BDGRSTVW]\s+\S+\s+\S*$", line)
         if match:
             yield match.group(1)
     process.wait()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107112.362946.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210730/eca79c61/attachment.bin>


More information about the llvm-commits mailing list