diff options
author | Mark Mitchell <mark@codesourcery.com> | 2002-10-25 19:39:47 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2002-10-25 19:39:47 +0000 |
commit | bb5e8a7ffc01267f79f7d3a70b98a29fc6eb604c (patch) | |
tree | bc8ca7b32029d71b1854594ff6c94c1ba702f188 /gcc/cp/semantics.c | |
parent | f3763a442e854320fd233fd63b7871f301f723be (diff) | |
download | gcc-bb5e8a7ffc01267f79f7d3a70b98a29fc6eb604c.zip gcc-bb5e8a7ffc01267f79f7d3a70b98a29fc6eb604c.tar.gz gcc-bb5e8a7ffc01267f79f7d3a70b98a29fc6eb604c.tar.bz2 |
class.c (build_vtbl_initializer): Don't use build_vtable_entry.
* class.c (build_vtbl_initializer): Don't use build_vtable_entry.
(build_vtable_entry): Remove.
* cp-tree.h (BINFO_VIRTUALS): Expand documentation.
(lang_decl): Add thunks.
(DECL_THUNKS): New macro.
* decl.c (duplicate_decls): Copy it.
* method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
* semantics.c (emit_associated_thunks): Simplify.
* g++.dg/abi/vthunk2.C: New test.
From-SVN: r58536
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c561a66..e2428a9 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2271,35 +2271,9 @@ emit_associated_thunks (fn) enabling you to output all the thunks with the function itself. */ if (DECL_VIRTUAL_P (fn)) { - tree binfo; - tree v; - - for (binfo = TYPE_BINFO (DECL_CONTEXT (fn)); - binfo; - binfo = TREE_CHAIN (binfo)) - for (v = BINFO_VIRTUALS (binfo); v; v = TREE_CHAIN (v)) - if (BV_FN (v) == fn - && (!integer_zerop (BV_DELTA (v)) - || BV_USE_VCALL_INDEX_P (v))) - { - tree thunk; - tree vcall_index; - - if (BV_USE_VCALL_INDEX_P (v)) - { - vcall_index = BV_VCALL_INDEX (v); - my_friendly_assert (vcall_index != NULL_TREE, 20000621); - } - else - vcall_index = NULL_TREE; - - thunk = make_thunk (build1 (ADDR_EXPR, - vfunc_ptr_type_node, - fn), - BV_DELTA (v), - vcall_index); - use_thunk (thunk, /*emit_p=*/1); - } + tree thunk; + for (thunk = DECL_THUNKS (fn); thunk; thunk = TREE_CHAIN (thunk)) + use_thunk (thunk, /*emit_p=*/1); } } |