diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-30 20:20:55 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-30 20:20:55 +0000 |
commit | ee19f44b465d98d329e2bc321ccc8a4ba5e6d4fa (patch) | |
tree | f9fcc7a5e7a3e1bb84179bde977d34c49ec5c243 /gcc/cp/class.c | |
parent | 9f4ec746affbde185eedfc5de139e8617061bbe3 (diff) | |
download | gcc-ee19f44b465d98d329e2bc321ccc8a4ba5e6d4fa.tar.gz |
PR c++/61659
PR lto/53808
gcc/cp
* decl2.c (maybe_emit_vtables): Mark all vtable entries if
devirtualizing.
* init.c (build_vtbl_address): Don't mark destructor.
* class.c (finish_struct_1): Add all classes to keyed_classes
if devirtualizing.
libstdc++-v3/
* libsupc++/cxxabi.h (class __pbase_type_info): __pointer_catch
is pure, not inline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index d3bc71e01ce..1c28dd6fe98 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -6405,8 +6405,10 @@ finish_struct_1 (tree t) determine_key_method (t); /* If a polymorphic class has no key method, we may emit the vtable - in every translation unit where the class definition appears. */ - if (CLASSTYPE_KEY_METHOD (t) == NULL_TREE) + in every translation unit where the class definition appears. If + we're devirtualizing, we can look into the vtable even if we + aren't emitting it. */ + if (CLASSTYPE_KEY_METHOD (t) == NULL_TREE || flag_devirtualize) keyed_classes = tree_cons (NULL_TREE, t, keyed_classes); } |