diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-20 07:16:34 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-19 12:51:06 -0700 |
commit | 522553837be31e09d182a8974429650f68c108f3 (patch) | |
tree | 371897aff2fe715e03f4422227669bebf2d47481 /gdb/jit.c | |
parent | 56c0cd6158851c2f870374a9c2114810dabac70b (diff) | |
download | fsf-binutils-gdb-522553837be31e09d182a8974429650f68c108f3.zip fsf-binutils-gdb-522553837be31e09d182a8974429650f68c108f3.tar.gz fsf-binutils-gdb-522553837be31e09d182a8974429650f68c108f3.tar.bz2 |
Remove allocate_block and allocate_global_block
This removes allocate_block and allocate_global_block in favor of
simply calling 'new'.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r-- | gdb/jit.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -567,7 +567,7 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile) int block_idx = FIRST_LOCAL_BLOCK; for (gdb_block &gdb_block_iter : stab->blocks) { - struct block *new_block = allocate_block (&objfile->objfile_obstack); + struct block *new_block = new (&objfile->objfile_obstack) block; struct symbol *block_name = new (&objfile->objfile_obstack) symbol; struct type *block_type = arch_type (objfile->arch (), TYPE_CODE_VOID, @@ -609,9 +609,10 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile) { struct block *new_block; - new_block = (i == GLOBAL_BLOCK - ? allocate_global_block (&objfile->objfile_obstack) - : allocate_block (&objfile->objfile_obstack)); + if (i == GLOBAL_BLOCK) + new_block = new (&objfile->objfile_obstack) global_block; + else + new_block = new (&objfile->objfile_obstack) block; new_block->set_multidict (mdict_create_linear (&objfile->objfile_obstack, NULL)); new_block->set_superblock (block_iter); |