This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Add Comment for TYPE_STUB_DECL


This is just a cut and paste of part of Jim Wilson's reply to me
request for info about the field TYPE_STUB_DECL. I assume he has
a copyright assignment as he works for Cygnus. I also have a
copyright assignment (as TE Shilson-Josling - I am in the process
of changing my legal name to Tim Josling),

I would also like to add some comments for the garbage collection
once I get through this one. I used the most common options that
everyone else used; let me know if I got it wrong,

Tim Josling

"Documentation is like sex and pizza. Even bad documentation is
pretty good."

--- ../../gcccvs/gcc/gcc/tree.h Wed Jan 17 07:39:27 2001
+++ tree.h      Mon Jan 29 20:17:44 2001
@@ -939,6 +939,14 @@ struct tree_block
 #define TYPE_ALIGN_UNIT(NODE) \
   (TYPE_ALIGN (NODE) / BITS_PER_UNIT)
 
+/* If your language allows you to declare types, and you want
debug
+info for them, then you need to generate corresponding TYPE_DECL
nodes
+for them.  These "stub" TYPE_DECL nodes have no name, and simply
point
+at the type node.  You then set the TYPE_STUB_DECL field of the
type
+node to point back at the TYPE_DECL node.  This allows the debug
+routines to know that the two nodes represent the same type, so
that
+we only get one debug info record for them. */
+
 #define TYPE_STUB_DECL(NODE) (TREE_CHAIN (NODE))
 
 /* In a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, it means the
type

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]