Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions llvm/utils/extract_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def should_keep_itanium_symbol(symbol, calling_convention_decoration):
if not symbol.startswith("_") and not symbol.startswith("."):
return symbol
# Discard manglings that aren't nested names
match = re.match("_Z(T[VTIS])?(N.+)", symbol)
match = re.match("\.?_Z(T[VTIS])?(N.+)", symbol)
if not match:
return None
# Demangle the name. If the name is too complex then we don't need to keep
Expand Down Expand Up @@ -323,7 +323,7 @@ def get_template_name(sym, mangling):
if mangling == "microsoft":
names = parse_microsoft_mangling(sym)
else:
match = re.match("_Z(T[VTIS])?(N.+)", sym)
match = re.match("\.?_Z(T[VTIS])?(N.+)", sym)
if match:
names, _ = parse_itanium_nested_name(match.group(2))
else:
Expand Down Expand Up @@ -483,6 +483,9 @@ def parse_tool_path(parser, tool, val):
else:
outfile = sys.stdout
for k, v in list(symbol_defs.items()):
# On AIX, export function descriptors instead of function entries.
if platform.system() == "AIX" and k.startswith("."):
continue
template = get_template_name(k, args.mangling)
if v == 1 and (not template or template in template_instantiation_refs):
print(k, file=outfile)