diff options
-rw-r--r-- | gcc/rust/backend/rust-tree.cc | 19 | ||||
-rw-r--r-- | gcc/rust/backend/rust-tree.h | 2 |
2 files changed, 13 insertions, 8 deletions
diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index de79a02..a276af8 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -4249,6 +4249,17 @@ struct GTY ((for_user)) source_location_table_entry tree var; }; +// exit/reenter namespace to declare some external functions + +} // namespace Rust + +extern void +gt_pch_nx (Rust::source_location_table_entry &); +extern void +gt_pch_nx (Rust::source_location_table_entry *, gt_pointer_operator, void *); + +namespace Rust { + /* Traits class for function start hash maps below. */ struct source_location_table_entry_hash @@ -4299,17 +4310,11 @@ struct source_location_table_entry_hash && ref.var == NULL_TREE); } - static void pch_nx (source_location_table_entry &p) - { - extern void gt_pch_nx (source_location_table_entry &); - gt_pch_nx (p); - } + static void pch_nx (source_location_table_entry &p) { gt_pch_nx (p); } static void pch_nx (source_location_table_entry &p, gt_pointer_operator op, void *cookie) { - extern void gt_pch_nx (source_location_table_entry *, gt_pointer_operator, - void *); gt_pch_nx (&p, op, cookie); } }; diff --git a/gcc/rust/backend/rust-tree.h b/gcc/rust/backend/rust-tree.h index 35cdbb9..d113c55 100644 --- a/gcc/rust/backend/rust-tree.h +++ b/gcc/rust/backend/rust-tree.h @@ -609,7 +609,7 @@ extern GTY (()) tree cp_global_trees[CPTI_MAX]; #define OVL_EXPORT_P(NODE) TREE_LANG_FLAG_5 (OVERLOAD_CHECK (NODE)) /* The first decl of an overload. */ -#define OVL_FIRST(NODE) ovl_first (NODE) +#define OVL_FIRST(NODE) Rust::ovl_first (NODE) /* The name of the overload set. */ #define OVL_NAME(NODE) DECL_NAME (OVL_FIRST (NODE)) |