[PATCH] D142989: [extract_symbols.py] Better handling of templates

Mike Hommey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 19:36:31 PST 2023


glandium resigned from this revision.
glandium added a comment.

Could you add before/after figures of the numbers of symbols in, say, clang.symbols in the summary?

Overall, this LGTM, but I'm not a reviewer.



================
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
----------------
would it be worth changing this to use `parse_microsoft_mangling`?


================
Comment at: llvm/utils/extract_symbols.py:334
+        # Check for a simple name
+        match = re.match('(\w+)@(.+)', arg)
+        if match:
----------------
you probably want to pass the `re.ASCII` flag to these match invocations.


================
Comment at: llvm/utils/extract_symbols.py:346
+        # Check for a template name
+        match = re.match('\?\$(\w+)\@[^@]+@(.+)', arg)
+        if match:
----------------
You can probably drop the `\` before the first `@`.


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