summaryrefslogtreecommitdiff
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-29 02:34:48 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-29 02:34:48 +0000
commitab7943b9fd874a88ec7067561e0f6a2d69c5d396 (patch)
tree9d32681a03d3ca309091c1dee14f1053a1621f84 /gcc/print-tree.c
parent78fe751b3a78922e64f0d58744b18d675a5a7141 (diff)
downloadgcc-ab7943b9fd874a88ec7067561e0f6a2d69c5d396.tar.gz
* Eliminate DECL_FIELD_SIZE.
* builtins.c (built_in_class_names, built_in_names): New variables. * c-decl.c (finish_struct): Set specified size in DECL_SIZE. * expr.c (expand_expr, case COMPONENT_REF): Get field size from DECL_SIZE, not DECL_FIELD_SIZE. * print-tree.c (print_node): Remove code that prints extra blank lines in some cases. Properly handle inline and builtin function cases. * stor-layout.c (layout_decl): Get specified size from DEC_SIZE. * tree.h (built_in_class_named, built_in_names): New declarations. (union tree_decl): Rename internal unions to u1 and u2 and change some of their components. Add new field built_in_class. (DECL_ALIGN, DECL_INCOMING_RTL, DECL_SAVED_INSNS, DECL_FRAME_SIZE): Reflect above changes. (DECL_FUNCTION_CODE, DECL_BUILT_IN_CLASS): Likewise. (DECL_SET_FUNCTION_CODE, DECL_FIELD_SIZE): Deleted. * objc/objc-act.c (objc_copy_list): Use DECL_SIZE, not DECL_FIELD_SIZE. (encode_field_decl): Likewise; also remove obsolete test for bitfield. * ch/ch-tree.h (DECL_ACTION_NESTING_LEVEL): Use new tree union name. * ch/decl.c (finish_struct): Don't clear DECL_FIELD_SIZE. * ch/typeck.c (make_chill_struct_type): Likewise. (apply_decl_field_layout): General cleanup. Set DECL_SIZE instead of DECL_FIELD_SIZE. * cp/class.c (build_vtbl_or_vbase_field, check_methods): Don't clear DECL_FIELD_SIZE. (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not DECL_FIELD_SIZE. * cp/rtti.c (expand_class_desc): Likewise. * cp/cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. (THUNK_VCALL_OFFSET): Likewise. (THUNK_DELTA): Reflect changes in ../tree.h. * java/java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * java/parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32249 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 3bef9146c74..1001efb0526 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -269,8 +269,10 @@ print_node (file, prefix, node, indent)
indent_to (file, indent + 3);
if (!ggc_p)
- print_obstack_name ((char *) node, file, "");
- indent_to (file, indent + 3);
+ {
+ print_obstack_name ((char *) node, file, "");
+ indent_to (file, indent + 3);
+ }
}
/* If a permanent object is in the wrong obstack, or the reverse, warn. */
@@ -399,19 +401,31 @@ print_node (file, prefix, node, indent)
print_node (file, "size", DECL_SIZE (node), indent + 4);
print_node (file, "unit size", DECL_SIZE_UNIT (node), indent + 4);
- indent_to (file, indent + 3);
+ if (TREE_CODE (node) != FUNCTION_DECL
+ || DECL_INLINE (node) || DECL_BUILT_IN (node))
+ indent_to (file, indent + 3);
+
if (TREE_CODE (node) != FUNCTION_DECL)
fprintf (file, " align %d", DECL_ALIGN (node));
else if (DECL_INLINE (node))
- fprintf (file, " frame_size %d", DECL_FRAME_SIZE (node));
+ {
+ fprintf (file, " frame_size ");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, DECL_FRAME_SIZE (node));
+ }
else if (DECL_BUILT_IN (node))
- fprintf (file, " built-in code %d", DECL_FUNCTION_CODE (node));
- if (TREE_CODE (node) == FIELD_DECL)
- print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4);
+ fprintf (file, " built-in %s:%s",
+ built_in_class_names[(int) DECL_BUILT_IN_CLASS (node)],
+ built_in_names[(int) DECL_FUNCTION_CODE (node)]);
+
if (DECL_POINTER_ALIAS_SET_KNOWN_P (node))
fprintf (file, " alias set %d", DECL_POINTER_ALIAS_SET (node));
+
+ if (TREE_CODE (node) == FIELD_DECL)
+ print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4);
+
print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4);
- print_node_brief (file, "machine_attributes", DECL_MACHINE_ATTRIBUTES (node), indent + 4);
+ print_node_brief (file, "machine_attributes",
+ DECL_MACHINE_ATTRIBUTES (node), indent + 4);
print_node_brief (file, "abstract_origin",
DECL_ABSTRACT_ORIGIN (node), indent + 4);