From: Thomas Schwinge Date: Mon, 9 Dec 2019 11:39:57 +0000 (+0100) Subject: In 'libgomp/target.c:gomp_exit_data', remove open-coded 'gomp_remove_var' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5859e400219c891b81e0788e7e58422706e4a49;p=gcc.git In 'libgomp/target.c:gomp_exit_data', remove open-coded 'gomp_remove_var' libgomp/ * target.c (gomp_exit_data): Use 'gomp_remove_var'. From-SVN: r279118 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index a0bd25177d1..c5541bcec81 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2019-12-09 Thomas Schwinge + + * target.c (gomp_exit_data): Use 'gomp_remove_var'. + 2019-12-09 Tobias Burnus * testsuite/libgomp.fortran/use_device_addr-3.f90: Make 'stop' codes diff --git a/libgomp/target.c b/libgomp/target.c index 84d6daa76ca..13f7921651f 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -2095,16 +2095,7 @@ gomp_exit_data (struct gomp_device_descr *devicep, size_t mapnum, - k->host_start), cur_node.host_end - cur_node.host_start); if (k->refcount == 0) - { - splay_tree_remove (&devicep->mem_map, k); - if (k->link_key) - splay_tree_insert (&devicep->mem_map, - (splay_tree_node) k->link_key); - if (k->tgt->refcount > 1) - k->tgt->refcount--; - else - gomp_unmap_tgt (k->tgt); - } + gomp_remove_var (devicep, k); break; default: