This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Add ObjC/ObjC++-specific field to lang_type structs
- From: Ziemowit Laski <zlaski at apple dot com>
- To: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 6 Dec 2004 19:51:11 -0800
- Subject: PATCH: Add ObjC/ObjC++-specific field to lang_type structs
As I reported in
http://gcc.gnu.org/ml/gcc/2004-12/msg00274.html
this patch produces at most a 0.5% compile-time regression, and does not
usually lead to a PCH size increase at all. So, this patch meets
Geoff's
criteria and I'll check it in.
--Zem
[gcc/ChangeLog]
2004-12-06 Ziemowit Laski <zlaski@apple.com>
* c-tree.h (struct lang_type): Add 'objc_protocols' field.
[gcc/cp/ChangeLog]
2004-12-06 Ziemowit Laski <zlaski@apple.com>
* cp-tree.h (struct lang_type_class): Add 'objc_protocols'
field.
Index: gcc/c-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-tree.h,v
retrieving revision 1.187
diff -u -3 -p -r1.187 c-tree.h
--- gcc/c-tree.h 11 Nov 2004 23:13:10 -0000 1.187
+++ gcc/c-tree.h 7 Dec 2004 03:50:23 -0000
@@ -73,6 +73,9 @@ struct lang_type GTY(())
/* In an ENUMERAL_TYPE, the min and max values. */
tree enum_min;
tree enum_max;
+ /* In a RECORD_TYPE, a list of Objective-C protocols that this type
+ adopts. This is used only in Objective-C. */
+ tree objc_protocols;
};
/* Record whether a type or decl was written with nonconstant size.
Index: gcc/cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1077
diff -u -3 -p -r1.1077 cp-tree.h
--- gcc/cp/cp-tree.h 29 Nov 2004 20:10:07 -0000 1.1077
+++ gcc/cp/cp-tree.h 7 Dec 2004 03:50:25 -0000
@@ -1062,6 +1062,9 @@ struct lang_type_class GTY(())
tree decl_list;
tree template_info;
tree befriending_classes;
+ /* In a RECORD_TYPE, a list of Objective-C protocols that this type
+ adopts. This is used only in Objective-C++. */
+ tree objc_protocols;
};
struct lang_type_ptrmem GTY(())