diff options
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 7a35b47a0b1..f2e8257b30b 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -37,7 +37,6 @@ static tree list_hash_lookup PROTO((int, tree, tree, tree)); static void propagate_binfo_offsets PROTO((tree, tree)); static int avoid_overlap PROTO((tree, tree)); static cp_lvalue_kind lvalue_p_1 PROTO((tree, int)); -static int equal_functions PROTO((tree, tree)); static tree no_linkage_helper PROTO((tree)); static tree build_srcloc PROTO((char *, int)); @@ -1411,20 +1410,6 @@ build_overload (decl, chain) return ovl_cons (decl, chain); } -/* Returns true iff functions are equivalent. Equivalent functions are - not identical only if one is a function-local extern function. - This assumes that function-locals don't have TREE_PERMANENT. */ - -static int -equal_functions (fn1, fn2) - tree fn1; - tree fn2; -{ - if (!TREE_PERMANENT (fn1) || !TREE_PERMANENT (fn2)) - return decls_match (fn1, fn2); - return fn1 == fn2; -} - /* True if fn is in ovl. */ int @@ -1435,9 +1420,9 @@ ovl_member (fn, ovl) if (ovl == NULL_TREE) return 0; if (TREE_CODE (ovl) != OVERLOAD) - return equal_functions (ovl, fn); + return ovl == fn; for (; ovl; ovl = OVL_CHAIN (ovl)) - if (equal_functions (OVL_FUNCTION (ovl), fn)) + if (OVL_FUNCTION (ovl) == fn) return 1; return 0; } |