diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-25 02:33:31 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-25 02:33:31 +0000 |
| commit | 37076bbb2d70a8fcd3d03ced83dd7b6d4bd57b95 (patch) | |
| tree | eb375d133be007843883038588274884865a19eb | |
| parent | 38e35ffd41b80dfb525d93065ee3cfc60132263b (diff) | |
| download | ppe42-gcc-37076bbb2d70a8fcd3d03ced83dd7b6d4bd57b95.tar.gz ppe42-gcc-37076bbb2d70a8fcd3d03ced83dd7b6d4bd57b95.zip | |
* search.c (note_debug_info_needed): Do perform this optimization
for dwarf2.
(maybe_suppress_debug_info): Likewise. Start by clearing
TYPE_DECL_SUPPRESS_DEBUG.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30658 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/cp/search.c | 29 |
2 files changed, 24 insertions, 12 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f9ff0372ce6..f089e4fffe8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +1999-11-24 Jason Merrill <jason@casey.cygnus.com> + + * search.c (note_debug_info_needed): Do perform this optimization + for dwarf2. + (maybe_suppress_debug_info): Likewise. Start by clearing + TYPE_DECL_SUPPRESS_DEBUG. + 1999-11-24 Mark Mitchell <mark@codesourcery.com> * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs. diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 6ca817164c8..ec2594c8a94 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -2912,19 +2912,28 @@ get_vbase_types (type) /* Debug info for C++ classes can get very large; try to avoid emitting it everywhere. - As it happens, this optimization wins even when the target supports - BINCL (though only slightly), so we always do it. */ + Note that this optimization wins even when the target supports + BINCL (if only slightly), and reduces the amount of work for the + linker. */ void maybe_suppress_debug_info (t) tree t; { - /* We don't bother with this for dwarf1, which shouldn't be used for C++ - anyway. */ - if (write_symbols == DWARF_DEBUG || write_symbols == DWARF2_DEBUG - || write_symbols == NO_DEBUG) + /* We can't do the usual TYPE_DECL_SUPPRESS_DEBUG thing with DWARF, which + does not support name references between translation units. It supports + symbolic references between translation units, but only within a single + executable or shared library. + + For DWARF 2, we handle TYPE_DECL_SUPPRESS_DEBUG by pretending + that the type was never defined, so we only get the members we + actually define. */ + if (write_symbols == DWARF_DEBUG || write_symbols == NO_DEBUG) return; + /* We might have set this earlier in cp_finish_decl. */ + TYPE_DECL_SUPPRESS_DEBUG (TYPE_MAIN_DECL (t)) = 0; + /* If we already know how we're handling this class, handle debug info the same way. */ if (CLASSTYPE_INTERFACE_ONLY (t)) @@ -2962,12 +2971,8 @@ note_debug_info_needed (type) /* We can't go looking for the base types and fields just yet. */ return; - /* We can't do the TYPE_DECL_SUPPRESS_DEBUG thing with DWARF, which - does not support name references between translation units. It supports - symbolic references between translation units, but only within a single - executable or shared library. */ - if (write_symbols == DWARF_DEBUG || write_symbols == DWARF2_DEBUG - || write_symbols == NO_DEBUG) + /* See the comment in maybe_suppress_debug_info. */ + if (write_symbols == DWARF_DEBUG || write_symbols == NO_DEBUG) return; dfs_walk (TYPE_BINFO (type), dfs_debug_mark, dfs_debug_unmarkedp, 0); |

