hash-table.h: support non-zero empty values in empty_slow (v2)
[gcc.git] / gcc / cp / cp-tree.h
index b47698e1d0ce83a07df3a29bf1c1cffa3de29b5a..4e26acc22a5d899266bd978bbd3617b8e6778ee7 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for C++ parsing and type checking.
-   Copyright (C) 1987-2019 Free Software Foundation, Inc.
+   Copyright (C) 1987-2020 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
@@ -900,6 +900,7 @@ struct named_decl_hash : ggc_remove <tree>
   inline static hashval_t hash (const value_type decl);
   inline static bool equal (const value_type existing, compare_type candidate);
 
+  static const bool empty_zero_p = true;
   static inline void mark_empty (value_type &p) {p = NULL_TREE;}
   static inline bool is_empty (value_type p) {return !p;}
 
@@ -1870,6 +1871,7 @@ struct named_label_hash : ggc_remove <named_label_entry *>
   inline static hashval_t hash (value_type);
   inline static bool equal (const value_type, compare_type);
 
+  static const bool empty_zero_p = true;
   inline static void mark_empty (value_type &p) {p = NULL;}
   inline static bool is_empty (value_type p) {return !p;}
 
@@ -1952,6 +1954,13 @@ struct GTY(()) language_function {
 
 #define current_vtt_parm cp_function_chain->x_vtt_parm
 
+/* A boolean flag to control whether we need to clean up the return value if a
+   local destructor throws.  Only used in functions that return by value a
+   class with a destructor.  Which 'tors don't, so we can use the same
+   field as current_vtt_parm.  */
+
+#define current_retval_sentinel current_vtt_parm
+
 /* Set to 0 at beginning of a function definition, set to 1 if
    a return statement that specifies a return value is seen.  */
 
@@ -6583,7 +6592,8 @@ extern bool vague_linkage_p                       (tree);
 extern void grokclassfn                                (tree, tree,
                                                 enum overload_flags);
 extern tree grok_array_decl                    (location_t, tree, tree, bool);
-extern tree delete_sanity                      (tree, tree, bool, int, tsubst_flags_t);
+extern tree delete_sanity                      (location_t, tree, tree, bool,
+                                                int, tsubst_flags_t);
 extern tree check_classfn                      (tree, tree, tree);
 extern void check_member_template              (tree);
 extern tree grokfield (const cp_declarator *, cp_decl_specifier_seq *,
@@ -6657,7 +6667,7 @@ extern void init_exception_processing             (void);
 extern tree expand_start_catch_block           (tree);
 extern void expand_end_catch_block             (void);
 extern tree build_exc_ptr                      (void);
-extern tree build_throw                                (tree);
+extern tree build_throw                                (location_t, tree);
 extern int nothrow_libfn_p                     (const_tree);
 extern void check_handlers                     (tree);
 extern tree finish_noexcept_expr               (tree, tsubst_flags_t);
@@ -6674,7 +6684,6 @@ extern tree begin_eh_spec_block                   (void);
 extern void finish_eh_spec_block               (tree, tree);
 extern tree build_eh_type_type                 (tree);
 extern tree cp_protect_cleanup_actions         (void);
-extern tree create_try_catch_expr               (tree, tree);
 extern tree template_parms_to_args             (tree);
 extern tree template_parms_level_to_args       (tree);
 extern tree generic_targs_for                  (tree);
@@ -6720,17 +6729,18 @@ extern tree throw_bad_array_new_length          (void);
 extern bool type_has_new_extended_alignment    (tree);
 extern unsigned malloc_alignment               (void);
 extern tree build_new_constexpr_heap_type      (tree, tree, tree);
-extern tree build_new                          (vec<tree, va_gc> **, tree, tree,
-                                                vec<tree, va_gc> **, int,
-                                                 tsubst_flags_t);
+extern tree build_new                          (location_t,
+                                                vec<tree, va_gc> **, tree,
+                                                tree, vec<tree, va_gc> **,
+                                                int, tsubst_flags_t);
 extern tree get_temp_regvar                    (tree, tree);
 extern tree build_vec_init                     (tree, tree, tree, bool, int,
                                                  tsubst_flags_t);
-extern tree build_delete                       (tree, tree,
+extern tree build_delete                       (location_t, tree, tree,
                                                 special_function_kind,
                                                 int, int, tsubst_flags_t);
 extern void push_base_cleanups                 (void);
-extern tree build_vec_delete                   (tree, tree,
+extern tree build_vec_delete                   (location_t, tree, tree,
                                                 special_function_kind, int,
                                                 tsubst_flags_t);
 extern tree create_temporary_var               (tree);
@@ -7360,6 +7370,7 @@ extern tree build_min_non_dep_call_vec            (tree, tree, vec<tree, va_gc> *);
 extern vec<tree, va_gc>* vec_copy_and_insert    (vec<tree, va_gc>*, tree, unsigned);
 extern tree build_cplus_new                    (tree, tree, tsubst_flags_t);
 extern tree build_local_temp                   (tree);
+extern bool is_local_temp                      (tree);
 extern tree build_aggr_init_expr               (tree, tree);
 extern tree get_target_expr                    (tree);
 extern tree get_target_expr_sfinae             (tree, tsubst_flags_t);
@@ -7487,8 +7498,10 @@ extern bool compparms                            (const_tree, const_tree);
 extern int comp_cv_qualification               (const_tree, const_tree);
 extern int comp_cv_qualification               (int, int);
 extern int comp_cv_qual_signature              (tree, tree);
-extern tree cxx_sizeof_or_alignof_expr         (tree, enum tree_code, bool);
-extern tree cxx_sizeof_or_alignof_type         (tree, enum tree_code, bool, bool);
+extern tree cxx_sizeof_or_alignof_expr         (location_t, tree,
+                                                enum tree_code, bool);
+extern tree cxx_sizeof_or_alignof_type         (location_t, tree,
+                                                enum tree_code, bool, bool);
 extern tree cxx_alignas_expr                    (tree);
 extern tree cxx_sizeof_nowarn                   (tree);
 extern tree is_bitfield_expr_with_lowered_type  (const_tree);
@@ -7500,6 +7513,7 @@ extern tree build_class_member_access_expr      (cp_expr, tree, tree, bool,
                                                 tsubst_flags_t);
 extern tree finish_class_member_access_expr     (cp_expr, tree, bool,
                                                 tsubst_flags_t);
+extern tree lookup_destructor                  (tree, tree, tree, tsubst_flags_t);
 extern tree build_x_indirect_ref               (location_t, tree,
                                                 ref_operator,
                                                 tsubst_flags_t);
@@ -7603,7 +7617,7 @@ extern tree cp_build_binary_op                  (const op_location_t &,
 extern tree build_x_vec_perm_expr               (location_t,
                                                 tree, tree, tree,
                                                 tsubst_flags_t);
-#define cxx_sizeof(T)  cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, false, true)
+#define cxx_sizeof(T)  cxx_sizeof_or_alignof_type (input_location, T, SIZEOF_EXPR, false, true)
 extern tree build_simple_component_ref         (tree, tree);
 extern tree build_ptrmemfunc_access_expr       (tree, tree);
 extern tree build_address                      (tree);
@@ -7853,7 +7867,7 @@ extern bool constraints_satisfied_p               (tree, tree);
 extern void clear_satisfaction_cache           ();
 extern bool* lookup_subsumption_result          (tree, tree);
 extern bool save_subsumption_result             (tree, tree, bool);
-extern tree find_template_parameters           (tree, int);
+extern tree find_template_parameters           (tree, tree);
 extern bool equivalent_constraints              (tree, tree);
 extern bool equivalently_constrained            (tree, tree);
 extern bool subsumes_constraints                (tree, tree);