diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py index 0cbfd2e2910e1..3829f5b64bb4d 100755 --- a/llvm/utils/extract_symbols.py +++ b/llvm/utils/extract_symbols.py @@ -113,6 +113,9 @@ def should_keep_microsoft_symbol(symbol, calling_convention_decoration): and (symbol.startswith("?Head@") or symbol.startswith("?Tail@")) ): return symbol + # Skip symbols added by the compiler with -fprofile-generate. + elif symbol.startswith("__prof"): + return None # 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 @@ -131,7 +134,7 @@ def should_keep_microsoft_symbol(symbol, calling_convention_decoration): # ::= .+@ (list of types) # ::= .*Z (list of types, varargs) # ::= exceptions are not allowed - elif re.search(r"(llvm|clang)@@[A-Z][A-Z0-9_]*[A-JQ].+(X|.+@|.*Z)$", symbol): + elif re.search(r"(llvm|clang)@@[A-DG-LO-UW-Z][A-Z0-9_]*[A-JQ].+(X|.+@|.*Z)$", symbol): return symbol return None