From: Daniel Jacobowitz Date: Mon, 31 Jan 2005 23:19:34 +0000 (+0000) Subject: dwarf2out.c (scope_die_for): If the containing scope is a TRANSLATION_UNIT_DECL,... X-Git-Tag: releases/gcc-3.4.4~257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b7e77b288d993236e438af3dd3125af072fbd5e;p=thirdparty%2Fgcc.git dwarf2out.c (scope_die_for): If the containing scope is a TRANSLATION_UNIT_DECL, consider it to be a global. 2004-09-22 Mark Mitchell * gcc/dwarf2out.c (scope_die_for): If the containing scope is a TRANSLATION_UNIT_DECL, consider it to be a global. From-SVN: r94504 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b5bad2e13be..6e15b90ae266 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-01-31 Daniel Jacobowitz + + 2004-09-22 Mark Mitchell + * gcc/dwarf2out.c (scope_die_for): If the containing scope is a + TRANSLATION_UNIT_DECL, consider it to be a global. + 2005-01-29 Alan Modra * unwind-dw2.c (execute_stack_op): Add missing cases for diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9416023c5762..d59cc1d3ab57 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1,6 +1,6 @@ /* Output Dwarf2 format symbol table information from GCC. Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004 Free Software Foundation, Inc. + 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com). Extensively modified by Jason Merrill (jason@cygnus.com). @@ -10264,7 +10264,8 @@ scope_die_for (tree t, dw_die_ref context_die) if (containing_scope && TREE_CODE (containing_scope) == FUNCTION_TYPE) containing_scope = NULL_TREE; - if (containing_scope == NULL_TREE) + if (containing_scope == NULL_TREE + || TREE_CODE (containing_scope) == TRANSLATION_UNIT_DECL) scope_die = comp_unit_die; else if (TYPE_P (containing_scope)) {