[llvm] [Windows] Fix Registry static data members not exported by extract_symbols.py in static builds with plugin support (PR #163391)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 09:28:15 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD llvm/utils/extract_symbols.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- extract_symbols.py 2025-10-17 15:15:04.000000 +0000
+++ extract_symbols.py 2025-10-20 16:27:44.304589 +0000
@@ -105,12 +105,15 @@
# Skip X86GenMnemonicTables functions, they are not exposed from llvm/include/.
elif re.match(r"\?is[A-Z0-9]*@X86 at llvm", symbol):
return None
# Keep Registry<T>::Head and Registry<T>::Tail static members for plugin support.
# Pattern matches: ?Head@?$Registry@<template_args>@llvm@@ or ?Tail@?$Registry at ...
- elif ("?$Registry@" in symbol and "@llvm@@" in symbol and
- (symbol.startswith("?Head@") or symbol.startswith("?Tail@"))):
+ elif (
+ "?$Registry@" in symbol
+ and "@llvm@@" in symbol
+ and (symbol.startswith("?Head@") or symbol.startswith("?Tail@"))
+ ):
return symbol
# Keep mangled llvm:: and clang:: function symbols. How we detect these is a
# bit of a mess and imprecise, but that avoids having to completely demangle
# the symbol name. The outermost namespace is at the end of the identifier
# mangling, and the identifier mangling is followed by the type mangling, so
``````````
</details>
https://github.com/llvm/llvm-project/pull/163391
More information about the llvm-commits
mailing list