Skip to content

Commit

Permalink
[extract_symbols.py] Export unique symbols
Browse files Browse the repository at this point in the history
As described in a comment on 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

Differential Revision: https://reviews.llvm.org/D146731
  • Loading branch information
tmatheson-arm committed Mar 24, 2023
1 parent f5150ee commit 3884f07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/utils/extract_symbols.py
Expand Up @@ -58,7 +58,7 @@ def nm_get_symbols(lib):
# 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
Expand Down

0 comments on commit 3884f07

Please sign in to comment.