#define GCC_C_COMMON_H
#include "splay-tree.h"
+#include "cpplib.h"
/* Usage of TREE_LANG_FLAG_?:
0: COMPOUND_STMT_NO_SCOPE (in COMPOUND_STMT).
RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE,
/* ObjC */
- RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
+ RID_FIRST_PQ, RID_IN = RID_FIRST_PQ, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
/* C */
RID_INT, RID_CHAR, RID_FLOAT, RID_DOUBLE, RID_VOID,
CTI_C_BOOL_FALSE,
CTI_DEFAULT_FUNCTION_TYPE,
- CTI_VOID_FTYPE,
- CTI_VOID_FTYPE_PTR,
- CTI_INT_FTYPE_INT,
- CTI_PTR_FTYPE_SIZETYPE,
-
CTI_G77_INTEGER_TYPE,
CTI_G77_UINTEGER_TYPE,
CTI_G77_LONGINT_TYPE,
CTI_MAX
};
+#define C_RID_CODE(id) (((struct c_common_identifier *) (id))->rid_code)
+
+/* Identifier part common to the C front ends. Inherits from
+ tree_identifier, despite appearances. */
+struct c_common_identifier
+{
+ struct tree_common common;
+ struct cpp_hashnode node;
+ ENUM_BITFIELD(rid) rid_code: CHAR_BIT;
+};
+
#define wchar_type_node c_global_trees[CTI_WCHAR_TYPE]
#define signed_wchar_type_node c_global_trees[CTI_SIGNED_WCHAR_TYPE]
#define unsigned_wchar_type_node c_global_trees[CTI_UNSIGNED_WCHAR_TYPE]
#define const_string_type_node c_global_trees[CTI_CONST_STRING_TYPE]
#define default_function_type c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
-#define void_ftype c_global_trees[CTI_VOID_FTYPE]
-#define void_ftype_ptr c_global_trees[CTI_VOID_FTYPE_PTR]
-#define int_ftype_int c_global_trees[CTI_INT_FTYPE_INT]
-#define ptr_ftype_sizetype c_global_trees[CTI_PTR_FTYPE_SIZETYPE]
/* g77 integer types, which which must be kept in sync with f/com.h */
#define g77_integer_type_node c_global_trees[CTI_G77_INTEGER_TYPE]
extern int flag_no_nonansi_builtin;
-/* If non-NULL, dump the tree structure for the entire translation
- unit to this file. */
-
-extern const char *flag_dump_translation_unit;
-
/* Nonzero means warn about suggesting putting in ()'s. */
extern int warn_parentheses;
/* In dump.c */
+/* Different tree dump places. */
+enum tree_dump_index
+{
+ TDI_all, /* dump the whole translation unit */
+ TDI_original, /* dump each function before optimizing it */
+ TDI_optimized, /* dump each function after optimizing it */
+ TDI_class, /* dump class heirarchy */
+ TDI_end
+};
+
+/* Bit masks to control tree dumping. */
+#define TDF_ADDRESS (1 << 0) /* dump node addresses */
+#define TDF_SLIM (1 << 1) /* don't go wild following links */
+
typedef struct dump_info *dump_info_p;
/* A callback function used dump language-specific parts of tree
extern dump_tree_fn lang_dump_tree;
-extern void dump_node_to_file PARAMS ((tree, const char *));
+extern int dump_flag PARAMS ((dump_info_p, int, tree));
+extern int dump_enabled_p PARAMS ((enum tree_dump_index));
+extern FILE *dump_begin PARAMS ((enum tree_dump_index, int *));
+extern void dump_end PARAMS ((enum tree_dump_index, FILE *));
+extern void dump_node PARAMS ((tree, int, FILE *));
+extern int dump_switch_p PARAMS ((const char *));
/* Information recorded about each file examined during compilation. */
struct c_fileinfo *get_fileinfo PARAMS ((const char *));
extern void dump_time_statistics PARAMS ((void));
-#endif
+#endif /* ! GCC_C_COMMON_H */