[llvm] 3884f07 - [extract_symbols.py] Export unique symbols
Tomas Matheson via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 09:38:44 PDT 2023
Author: Tomas Matheson
Date: 2023-03-24T16:37:43Z
New Revision: 3884f07a55abfad6683e22bcfec3ea7647b3371a
URL: https://github.com/llvm/llvm-project/commit/3884f07a55abfad6683e22bcfec3ea7647b3371a
DIFF: https://github.com/llvm/llvm-project/commit/3884f07a55abfad6683e22bcfec3ea7647b3371a.diff
LOG: [extract_symbols.py] Export unique symbols
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
Added:
Modified:
llvm/utils/extract_symbols.py
Removed:
################################################################################
diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py
index 20be2881bc094..7ec27b3f249ec 100755
--- a/llvm/utils/extract_symbols.py
+++ b/llvm/utils/extract_symbols.py
@@ -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
More information about the llvm-commits
mailing list