aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-09-23 14:41:07 -0600
committerTom Tromey <tom@tromey.com>2017-09-25 19:54:06 -0600
commitc0e383c63818baee1daf51b8fb1bae34d1e0597f (patch)
tree5cee64be852dbf5ed10399f5a81088e9814cb609 /gdb/regcache.c
parent791199cc75fd294a4f5a228f83abdcbfb4c64c7e (diff)
downloadgdb-c0e383c63818baee1daf51b8fb1bae34d1e0597f.zip
gdb-c0e383c63818baee1daf51b8fb1bae34d1e0597f.tar.gz
gdb-c0e383c63818baee1daf51b8fb1bae34d1e0597f.tar.bz2
Remove regcache_xfree
This removes regcache_xfree in favor of plain "delete". gdb/ChangeLog 2017-09-25 Tom Tromey <tom@tromey.com> * spu-tdep.c (spu2ppu_dealloc_cache): Use delete. * regcache.h (regcache_xfree): Don't declare. * regcache.c (regcache_xfree): Remove. (do_regcache_xfree): Use delete. * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete. * linux-fork.c (free_fork): Use delete. (fork_save_infrun_state): Likewise. * jit.c (jit_dealloc_cache): Use delete. * infrun.c (discard_infcall_suspend_state): Use delete.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 2a92cf0..54aed6c 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -241,19 +241,10 @@ regcache_get_ptid (const struct regcache *regcache)
return regcache->ptid ();
}
-void
-regcache_xfree (struct regcache *regcache)
-{
- if (regcache == NULL)
- return;
-
- delete regcache;
-}
-
static void
do_regcache_xfree (void *data)
{
- regcache_xfree ((struct regcache *) data);
+ delete (struct regcache *) data;
}
struct cleanup *