summaryrefslogtreecommitdiff
path: root/gdb/addrmap.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-04-16 09:48:12 -0600
committerTom Tromey <tom@tromey.com>2022-06-12 10:49:48 -0600
commit10cce2c44190c0d822c593c221f7ffa2ea20f246 (patch)
treef0656de9650de9ea225a273c5c04f3ddcbd42cbe /gdb/addrmap.c
parent769520b7e5c3a6a941969b3b3c52fa04edf73295 (diff)
Remove addrmap_create_mutable
This removes addrmap_create_mutable in favor of using 'new' at the spots where the addrmap is created.
Diffstat (limited to 'gdb/addrmap.c')
-rw-r--r--gdb/addrmap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index b9a787135b..29e6b2e8a3 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -406,12 +406,6 @@ addrmap_mutable::addrmap_mutable (struct obstack *obs)
}
-struct addrmap *
-addrmap_create_mutable (struct obstack *obstack)
-{
- return new (obstack) struct addrmap_mutable (obstack);
-}
-
/* See addrmap.h. */
void
@@ -483,7 +477,8 @@ test_addrmap ()
/* Create mutable addrmap. */
struct obstack temp_obstack;
obstack_init (&temp_obstack);
- struct addrmap *map = addrmap_create_mutable (&temp_obstack);
+ struct addrmap_mutable *map
+ = new (&temp_obstack) addrmap_mutable (&temp_obstack);
SELF_CHECK (map != nullptr);
/* Check initial state. */