Эх сурвалжийг харах

[libc++] Make sure that the symbol differ takes into account symbol types

Summary:
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.

Reviewers: EricWF

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D60416

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@358408 91177308-0d34-0410-b5e6-96231b3b80d8
Louis Dionne 6 жил өмнө
parent
commit
0f44da2d3d

+ 3 - 3
utils/libcxx/sym_check/diff.py

@@ -14,10 +14,10 @@ from libcxx.sym_check import util
 
 
 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):