aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc.h
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2003-07-16 18:45:56 +0000
committerAndrew Pinski <pinskia@physics.uc.edu>2003-07-16 18:45:56 +0000
commit2e0100cc7e158d86f28973e4a8fa11712f12aad9 (patch)
tree39a0963ec716fc0d03212b9d1c71114101da5421 /gcc/ggc.h
parent7fbc2365c472fb09a2e6d9eede34360f366eed1c (diff)
2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
ChangeLog: PR c/10962 * ggc.h: Add header guards. * c-decl.c (finish_struct): Sort fields if number greater than 15 and there are no anonymous structs/unions. * c-common.h: Include ggc.h. (sorted_fields_type): New struct. (field_decl_cmp): New prototype. (resort_sorted_fields): New prototype. (DECL_DECLARES_TYPE_NON_TEMPLATE_P): New macro. * c-tree.h: (lang_type): Use pointer to sorted_fields_type as s, removing other fields. * c-typeck.c (lookup_field): Use s in lang_type. These were mostly moved from cp/class.c: * c-common.c (field_decl_cmp): New static function. (field_decl_cmp): New function. (resort_sorted_fields): New function. cp/ChangeLog: * class.c (field_decl_cmp): Remove. (resort_field_decl_cmp): Remove. (resort_sorted_fields): Remove. (add_fields_to_vec): Rename to ... (add_fields_to_record_type): this. (finish_struct_1): Change to be using sorted_fields_type's fields. * cp-tree.h (lang_decl): In lang_decl_u3 change sorted_fields to be a pointer to sorted_fields_type. (resort_sorted_fields): Remove prototype. * search.c (lookup_field_1): Change to be using sorted_fields_type's fields. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@69470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r--gcc/ggc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 2c56a3c525e..3a88e165479 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#ifndef GCC_GGC_H
+#define GCC_GGC_H
+
/* Symbols are marked with `ggc' for `gcc gc' so as not to interfere with
an external gc library that might be linked in. */
@@ -259,3 +262,5 @@ extern void stringpool_statistics (void);
extern int ggc_min_expand_heuristic (void);
extern int ggc_min_heapsize_heuristic (void);
extern void init_ggc_heuristics (void);
+
+#endif