[libcxx-commits] [PATCH] D60416: [libc++] Make sure that the symbol differ takes into account symbol types

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 8 11:54:49 PDT 2019


ldionne created this revision.
ldionne added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous, christof.
Herald added a project: libc++.

Otherwise, it doesn't take into account things like whether the symbol
is defined or undefined, and whether symbols are indirect references
(re-exports) or not.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D60416

Files:
  libcxx/utils/libcxx/sym_check/diff.py


Index: libcxx/utils/libcxx/sym_check/diff.py
===================================================================
--- libcxx/utils/libcxx/sym_check/diff.py
+++ libcxx/utils/libcxx/sym_check/diff.py
@@ -14,10 +14,10 @@
 
 
 def _symbol_difference(lhs, rhs):
-    lhs_names = set((n['name'] for n in lhs))
-    rhs_names = set((n['name'] for n in rhs))
+    lhs_names = set(((n['name'], n['type']) for n in lhs))
+    rhs_names = set(((n['name'], n['type']) for n in rhs))
     diff_names = lhs_names - rhs_names
-    return [n for n in lhs if n['name'] in diff_names]
+    return [n for n in lhs if (n['name'], n['type']) in diff_names]
 
 
 def _find_by_key(sym_list, k):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60416.194185.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190408/5a4384e0/attachment.bin>


More information about the libcxx-commits mailing list