aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-05-05 23:07:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-05-05 23:07:05 +0200
commit6e57a01df44693719cdaa9c552bfc3d729f5c095 (patch)
tree533ece87754450454a84166bbf313727a22c4856 /gcc/dwarf2out.c
parent21c3348aea87865dfa7e1d3ab3a6fa32a13bf325 (diff)
downloadgcc-6e57a01df44693719cdaa9c552bfc3d729f5c095.zip
gcc-6e57a01df44693719cdaa9c552bfc3d729f5c095.tar.gz
gcc-6e57a01df44693719cdaa9c552bfc3d729f5c095.tar.bz2
tree.h: Remove DECL_BY_REFERENCE from private_flag comment.
* tree.h: Remove DECL_BY_REFERENCE from private_flag comment. (struct tree_base): Adjust spacing for 8 bit boundaries. (struct tree_decl_common): Add decl_by_reference_flag bit. (DECL_BY_REFERENCE): Adjust. * print-tree.c (print_node): For VAR_DECL, PARM_DECL or RESULT_DECL, print DECL_BY_REFERENCE bit. * dbxout.c (DECL_ACCESSIBILITY_CHAR): Revert last change. * dwarf2out.c (loc_by_reference, gen_decl_die): Check DECL_BY_REFERENCE for all VAR_DECLs, not just non-static ones. (gen_variable_die): Likewise. Check TREE_PRIVATE/TREE_PROTECTED unconditionally. From-SVN: r147135
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f441fb8..73a31ec 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -11715,7 +11715,7 @@ loc_by_reference (dw_loc_descr_ref loc, tree decl)
if ((TREE_CODE (decl) != PARM_DECL
&& TREE_CODE (decl) != RESULT_DECL
- && (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)))
+ && TREE_CODE (decl) != VAR_DECL)
|| !DECL_BY_REFERENCE (decl))
return loc;
@@ -14048,19 +14048,13 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
else
{
tree type = TREE_TYPE (decl);
- bool private_flag_valid = true;
add_name_and_src_coords_attributes (var_die, decl);
if ((TREE_CODE (decl) == PARM_DECL
|| TREE_CODE (decl) == RESULT_DECL
- || (TREE_CODE (decl) == VAR_DECL && !TREE_STATIC (decl)))
+ || TREE_CODE (decl) == VAR_DECL)
&& DECL_BY_REFERENCE (decl))
- {
- add_type_attribute (var_die, TREE_TYPE (type), 0, 0, context_die);
- /* DECL_BY_REFERENCE uses the same bit as TREE_PRIVATE,
- for PARM_DECL, RESULT_DECL or non-static VAR_DECL. */
- private_flag_valid = false;
- }
+ add_type_attribute (var_die, TREE_TYPE (type), 0, 0, context_die);
else
add_type_attribute (var_die, type, TREE_READONLY (decl),
TREE_THIS_VOLATILE (decl), context_die);
@@ -14073,7 +14067,7 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
if (TREE_PROTECTED (decl))
add_AT_unsigned (var_die, DW_AT_accessibility, DW_ACCESS_protected);
- else if (private_flag_valid && TREE_PRIVATE (decl))
+ else if (TREE_PRIVATE (decl))
add_AT_unsigned (var_die, DW_AT_accessibility, DW_ACCESS_private);
}
@@ -15307,8 +15301,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
/* Output any DIEs that are needed to specify the type of this data
object. */
if ((TREE_CODE (decl_or_origin) == RESULT_DECL
- || (TREE_CODE (decl_or_origin) == VAR_DECL
- && !TREE_STATIC (decl_or_origin)))
+ || TREE_CODE (decl_or_origin) == VAR_DECL)
&& DECL_BY_REFERENCE (decl_or_origin))
gen_type_die (TREE_TYPE (TREE_TYPE (decl_or_origin)), context_die);
else