[PATCH] D146731: [extract_symbols.py] Export unique symbols

Tomas Matheson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 09:15:03 PDT 2023


tmatheson created this revision.
tmatheson added reviewers: john.brawn, IBricchi, jsji, simon_tatham, Jake-Egan.
Herald added a project: All.
tmatheson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As described in a comment on D140637 <https://reviews.llvm.org/D140637>, PluginInlineOrderTest.NoInlineFoo
will fail with:

InlineOrderPlugin.so: undefined symbol: _ZN4llvm13AllAnalysesOnINS_6ModuleEE6SetKeyE

The symbol is unique in libLLVMCore and ends up local in AnalysisTests.
Fix this by exporting all unique symbols found in libraries.

AnalysisTests.symbols change in line count: 12464 -> 12499


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146731

Files:
  llvm/utils/extract_symbols.py


Index: llvm/utils/extract_symbols.py
===================================================================
--- llvm/utils/extract_symbols.py
+++ llvm/utils/extract_symbols.py
@@ -58,7 +58,7 @@
         # 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)
+        match = re.match("^(\S+)\s+[BDGRSTuVW]\s+\S+\s+\S*$", line)
         if match:
             yield (match.group(1), True)
         # Look for undefined symbols, which have type U and may or may not


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146731.507763.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/7cd38ce4/attachment.bin>


More information about the llvm-commits mailing list