[PATCH] D142989: [extract_symbols.py] Better handling of templates
John Brawn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 05:37:25 PST 2023
john.brawn marked an inline comment as done.
john.brawn added a subscriber: glandium.
john.brawn added a comment.
In D142989#4095488 <https://reviews.llvm.org/D142989#4095488>, @glandium wrote:
> Could you add before/after figures of the numbers of symbols in, say, clang.symbols in the summary?
Will do.
================
Comment at: llvm/utils/extract_symbols.py:183
# <throw-spec> ::= exceptions are not allowed
elif re.search('(llvm|clang)@@[A-Z][A-Z0-9_]*[A-JQ].+(X|.+@|.*Z)$', symbol):
return symbol
----------------
glandium wrote:
> would it be worth changing this to use `parse_microsoft_mangling`?
The important thing here is detecting that we have a function type mangling, which parse_microsoft_mangling doesn't do.
================
Comment at: llvm/utils/extract_symbols.py:334
+ # Check for a simple name
+ match = re.match('(\w+)@(.+)', arg)
+ if match:
----------------
glandium wrote:
> you probably want to pass the `re.ASCII` flag to these match invocations.
Names in symbols aren't necessarily ASCII, e.g.
```
int あ() { return 0; }
```
results in the symbol `?あ@@YAHXZ`. Though we probably don't use non-ASCII identifiers in LLVM, so it doesn't really matter.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142989/new/
https://reviews.llvm.org/D142989
More information about the llvm-commits
mailing list