aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-10-01 10:45:40 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-10-01 10:45:40 +0000
commit29aca1e1a95a8af77413facab63c2182566a4583 (patch)
treebfd0ea4b8add222fe31ff7747664308744d1f317 /gcc
parentfec6e65b2081bd19240d1242091d7b15cbf5afe4 (diff)
downloadgcc-29aca1e1a95a8af77413facab63c2182566a4583.zip
gcc-29aca1e1a95a8af77413facab63c2182566a4583.tar.gz
gcc-29aca1e1a95a8af77413facab63c2182566a4583.tar.bz2
dwarf2out.c (gen_namespace_die): Use DECL_FILE_SCOPE_P.
2010-10-01 Richard Guenther <rguenther@suse.de> * dwarf2out.c (gen_namespace_die): Use DECL_FILE_SCOPE_P. (gen_decl_die): Likewise. From-SVN: r164874
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d2f6bf3..9708bac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-01 Richard Guenther <rguenther@suse.de>
+
+ * dwarf2out.c (gen_namespace_die): Use DECL_FILE_SCOPE_P.
+ (gen_decl_die): Likewise.
+
2010-10-01 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/spu/spu.c (spu_init_builtins): No longer add END_BUILTINS
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9136eaa..af5f809 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -20620,7 +20620,7 @@ gen_namespace_die (tree decl, dw_die_ref context_die)
dw_die_ref origin_die
= force_decl_die (DECL_ABSTRACT_ORIGIN (decl));
- if (DECL_CONTEXT (decl) == NULL_TREE
+ if (DECL_FILE_SCOPE_P (decl)
|| TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL)
context_die = setup_namespace_context (decl, comp_unit_die ());
/* Now create the namespace alias DIE. */
@@ -20670,7 +20670,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
/* Don't output any DIEs to represent mere function declarations,
unless they are class members or explicit block externs. */
if (DECL_INITIAL (decl_or_origin) == NULL_TREE
- && DECL_CONTEXT (decl_or_origin) == NULL_TREE
+ && DECL_FILE_SCOPE_P (decl_or_origin)
&& (current_function_decl == NULL_TREE
|| DECL_ARTIFICIAL (decl_or_origin)))
break;