diff options
| author | Jason Merrill <jason@casey.cygnus.com> | 1999-11-16 01:37:39 +0000 |
|---|---|---|
| committer | Jason Merrill <jason@gcc.gnu.org> | 1999-11-15 20:37:39 -0500 |
| commit | ae673f140351f3cb46dd7856c493a3ae52a7f15c (patch) | |
| tree | 67da42d593d4dbfeed5167b23b222f87b07b537b /gcc/cp/class.c | |
| parent | 348bb3c7ed94f7224110bab364e70d962a7c31c0 (diff) | |
| download | gcc-ae673f140351f3cb46dd7856c493a3ae52a7f15c.zip gcc-ae673f140351f3cb46dd7856c493a3ae52a7f15c.tar.gz gcc-ae673f140351f3cb46dd7856c493a3ae52a7f15c.tar.bz2 | |
class.c (finish_struct): If we're a local class in a template function, add a TAG_DEFN.
* class.c (finish_struct): If we're a local class in a template
function, add a TAG_DEFN.
* pt.c (lookup_template_class): If this is a local class in a
template function, call pushtag.
(tsubst_expr, case TAG_DEFN): Handle classes, too.
Emit debug info with the vtable.
* search.c (maybe_suppress_debug_info): New function...
* class.c (finish_struct_1): ...split out from here.
* cp-tree.h: Declare it.
* decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
if we're writing out the vtable.
* decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
note_debug_info_needed): #if 0 out.
From-SVN: r30541
Diffstat (limited to 'gcc/cp/class.c')
| -rw-r--r-- | gcc/cp/class.c | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a3b37f7..19bd69c 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4180,46 +4180,7 @@ finish_struct_1 (t) if (warn_overloaded_virtual) warn_hidden (t); -#if 0 - /* This has to be done after we have sorted out what to do with - the enclosing type. */ - if (write_symbols != DWARF_DEBUG) - { - /* Be smarter about nested classes here. If a type is nested, - only output it if we would output the enclosing type. */ - if (DECL_CLASS_SCOPE_P (TYPE_MAIN_DECL (t))) - DECL_IGNORED_P (TYPE_MAIN_DECL (t)) = TREE_ASM_WRITTEN (TYPE_MAIN_DECL (t)); - } -#endif - - if (write_symbols != DWARF_DEBUG && write_symbols != DWARF2_DEBUG) - { - /* If the type has methods, we want to think about cutting down - the amount of symbol table stuff we output. The value stored in - the TYPE_DECL's DECL_IGNORED_P slot is a first approximation. - For example, if a member function is seen and we decide to - write out that member function, then we can change the value - of the DECL_IGNORED_P slot, and the type will be output when - that member function's debug info is written out. - - We can't do this with DWARF, which does not support name - references between translation units. */ - if (CLASSTYPE_METHOD_VEC (t)) - { - /* Don't output full info about any type - which does not have its implementation defined here. */ - if (CLASSTYPE_INTERFACE_ONLY (t)) - TYPE_DECL_SUPPRESS_DEBUG (TYPE_MAIN_DECL (t)) = 1; -#if 0 - /* XXX do something about this. */ - else if (CLASSTYPE_INTERFACE_UNKNOWN (t)) - /* Only a first approximation! */ - TYPE_DECL_SUPPRESS_DEBUG (TYPE_MAIN_DECL (t)) = 1; -#endif - } - else if (CLASSTYPE_INTERFACE_ONLY (t)) - TYPE_DECL_SUPPRESS_DEBUG (TYPE_MAIN_DECL (t)) = 1; - } + maybe_suppress_debug_info (t); /* Finish debugging output for this type. */ rest_of_type_compilation (t, toplevel_bindings_p ()); @@ -4287,6 +4248,13 @@ finish_struct (t, attributes) else error ("trying to finish struct, but kicked out due to previous parse errors."); + if (processing_template_decl) + { + tree scope = current_scope (); + if (scope && TREE_CODE (scope) == FUNCTION_DECL) + add_tree (build_min (TAG_DEFN, t)); + } + return t; } |
