diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index f412ddd..a744d837 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -332,6 +332,7 @@ struct GTY(()) lang_identifier { cxx_binding *bindings; tree class_template_info; tree label_value; + bool oracle_looked_up; }; /* Return a typed pointer version of T if it designates a @@ -1530,15 +1531,17 @@ struct GTY(()) language_function { /* True if NAME is the IDENTIFIER_NODE for an overloaded "operator new" or "operator delete". */ #define NEW_DELETE_OPNAME_P(NAME) \ - ((NAME) == ansi_opname (NEW_EXPR) \ - || (NAME) == ansi_opname (VEC_NEW_EXPR) \ - || (NAME) == ansi_opname (DELETE_EXPR) \ - || (NAME) == ansi_opname (VEC_DELETE_EXPR)) + ((NAME) == cp_operator_id (NEW_EXPR) \ + || (NAME) == cp_operator_id (VEC_NEW_EXPR) \ + || (NAME) == cp_operator_id (DELETE_EXPR) \ + || (NAME) == cp_operator_id (VEC_DELETE_EXPR)) -#define ansi_opname(CODE) \ +#define cp_operator_id(CODE) \ (operator_name_info[(int) (CODE)].identifier) -#define ansi_assopname(CODE) \ +#define cp_assignment_operator_id(CODE) \ (assignment_operator_name_info[(int) (CODE)].identifier) +/* In parser.c. */ +extern tree cp_literal_operator_id (const char *); /* TRUE if a tree code represents a statement. */ extern bool statement_code_p[MAX_TREE_CODES]; @@ -6027,6 +6030,9 @@ extern void make_friend_class (tree, tree, bool); extern void add_friend (tree, tree, bool); extern tree do_friend (tree, tree, tree, tree, enum overload_flags, bool); +extern void set_global_friend (tree); +extern bool is_global_friend (tree); + /* in init.c */ extern tree expand_member_init (tree); extern void emit_mem_initializers (tree); @@ -6944,6 +6950,25 @@ extern void suggest_alternatives_for (location_t, tree, bool); extern bool suggest_alternative_in_explicit_scope (location_t, tree, tree); extern tree strip_using_decl (tree); +/* Tell the binding oracle what kind of binding we are looking for. */ + +enum cp_oracle_request +{ + CP_ORACLE_IDENTIFIER +}; + +/* If this is non-NULL, then it is a "binding oracle" which can lazily + create bindings when needed by the C compiler. The oracle is told + the name and type of the binding to create. It can call pushdecl + or the like to ensure the binding is visible; or do nothing, + leaving the binding untouched. c-decl.c takes note of when the + oracle has been called and will not call it again if it fails to + create a given binding. */ + +typedef void cp_binding_oracle_function (enum cp_oracle_request, tree identifier); + +extern cp_binding_oracle_function *cp_binding_oracle; + /* in constraint.cc */ extern void init_constraint_processing (); extern bool constraint_p (tree); @@ -7009,6 +7034,9 @@ extern void diagnose_constraints (location_t, tree, tree); extern tree decompose_conclusions (tree); extern bool subsumes (tree, tree); +/* In class.c */ +extern void cp_finish_injected_record_type (tree); + /* in vtable-class-hierarchy.c */ extern void vtv_compute_class_hierarchy_transitive_closure (void); extern void vtv_generate_init_routine (void); |