diff options
author | Tom Tromey <tromey@redhat.com> | 2010-07-07 17:23:39 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2010-07-07 17:23:39 +0000 |
commit | 9730bc27c97e294a05b6d71f82f500de2890056b (patch) | |
tree | 36e5a2d6ff28400d1fe31caff904f627834f515a /gcc/dwarf2out.c | |
parent | f5d5226b3d7cd2d667e4f40bf3180cf10aa0fb6a (diff) | |
download | gcc-9730bc27c97e294a05b6d71f82f500de2890056b.zip gcc-9730bc27c97e294a05b6d71f82f500de2890056b.tar.gz gcc-9730bc27c97e294a05b6d71f82f500de2890056b.tar.bz2 |
tm.texi: Update.
gcc
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) <TARGET_WANT_DEBUG_PUB_SECTIONS>:
Add @hook.
* target.def (want_debug_pub_sections): New hook.
* config/darwin.h (TARGET_WANT_DEBUG_PUB_SECTIONS): Define.
* dwarf2out.c (add_pubname_string): Check
targetm.want_debug_pub_sections.
(add_pubname): Likewise.
(add_pubtype): Likewise.
gcc/testsuite
* g++.dg/debug/dwarf2/pubnames-1.C: Make darwin-specific.
From-SVN: r161924
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 55fef55..434783a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11238,17 +11238,20 @@ dwarf2_name (tree decl, int scope) static void add_pubname_string (const char *str, dw_die_ref die) { - pubname_entry e; + if (targetm.want_debug_pub_sections) + { + pubname_entry e; - e.die = die; - e.name = xstrdup (str); - VEC_safe_push (pubname_entry, gc, pubname_table, &e); + e.die = die; + e.name = xstrdup (str); + VEC_safe_push (pubname_entry, gc, pubname_table, &e); + } } static void add_pubname (tree decl, dw_die_ref die) { - if (TREE_PUBLIC (decl)) + if (targetm.want_debug_pub_sections && TREE_PUBLIC (decl)) { const char *name = dwarf2_name (decl, 1); if (name) @@ -11263,6 +11266,9 @@ add_pubtype (tree decl, dw_die_ref die) { pubname_entry e; + if (!targetm.want_debug_pub_sections) + return; + e.name = NULL; if ((TREE_PUBLIC (decl) || die->die_parent == comp_unit_die) |