[PATCH] D26455: Handle non-inlined clang::Type::getAs specializations in extract_symbols.py
Stephan Bergmann via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 06:45:05 PST 2016
sberg updated this revision to Diff 77807.
https://reviews.llvm.org/D26455
Files:
utils/extract_symbols.py
Index: utils/extract_symbols.py
===================================================================
--- utils/extract_symbols.py
+++ utils/extract_symbols.py
@@ -128,8 +128,12 @@
if match:
return match.group(1)
return symbol
- # Function template instantiations start with ?$, discard them as it's
- # assumed that the definition is public
+ # Function template instantiations start with ?$; keep the instantiations of
+ # clang::Type::getAs, as some of them are explipict specializations that are
+ # defined in clang's lib/AST/Type.cpp; discard the rest as it's assumed that
+ # the definition is public
+ elif re.match('\?\?\$getAs at .+@Type at clang@@', symbol):
+ return symbol
elif symbol.startswith('??$'):
return None
# Deleting destructors start with ?_G or ?_E and can be discarded because
@@ -195,8 +199,12 @@
# defined in headers and not required to be kept
if re.match('[CD][123]', names[-1][0]) and names[-2][1]:
return None
- # Discard function template instantiations as it's assumed that the
- # definition is public
+ # Keep the instantiations of clang::Type::getAs, as some of them are
+ # explipict specializations that are defined in clang's lib/AST/Type.cpp;
+ # discard any other function template instantiations as it's assumed that
+ # the definition is public
+ elif symbol.startswith('_ZNK5clang4Type5getAs'):
+ return symbol
elif names[-1][1]:
return None
# Keep llvm:: and clang:: names
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26455.77807.patch
Type: text/x-patch
Size: 1563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161114/ec86180b/attachment.bin>
More information about the llvm-commits
mailing list