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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 15 07:04:53 PDT 2019


Author: ldionne
Date: Mon Apr 15 07:04:52 2019
New Revision: 358408

URL: http://llvm.org/viewvc/llvm-project?rev=358408&view=rev
Log:
[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

Modified:
    libcxx/trunk/utils/libcxx/sym_check/diff.py

Modified: libcxx/trunk/utils/libcxx/sym_check/diff.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/sym_check/diff.py?rev=358408&r1=358407&r2=358408&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/sym_check/diff.py (original)
+++ libcxx/trunk/utils/libcxx/sym_check/diff.py Mon Apr 15 07:04:52 2019
@@ -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):




More information about the libcxx-commits mailing list