mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
Have global_block inherit from block
This changes global_block to inherit from block, which is what was always intended.
This commit is contained in:
parent
44bb9f9e7a
commit
56c0cd6158
@ -397,9 +397,7 @@ allocate_block (struct obstack *obstack)
|
||||
struct block *
|
||||
allocate_global_block (struct obstack *obstack)
|
||||
{
|
||||
struct global_block *bl = new (obstack) struct global_block;
|
||||
|
||||
return &bl->block;
|
||||
return new (obstack) struct global_block;
|
||||
}
|
||||
|
||||
/* See block.h. */
|
||||
|
@ -314,12 +314,8 @@ struct block : public allocate_on_obstack
|
||||
/* The global block is singled out so that we can provide a back-link
|
||||
to the compunit symtab. */
|
||||
|
||||
struct global_block : public allocate_on_obstack
|
||||
struct global_block : public block
|
||||
{
|
||||
/* The block. */
|
||||
|
||||
struct block block;
|
||||
|
||||
/* This holds a pointer to the compunit symtab holding this block. */
|
||||
|
||||
struct compunit_symtab *compunit_symtab = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user