diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-27 22:01:10 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | 7b3ecc7555438f05dda657d0ed6a43ee71a3901d (patch) | |
tree | 851e01af89a5dda9ab1ea9c05b4059eda7497907 /gdb/symtab.h | |
parent | 6c9c307c67043b55a209af402246404d89f992c9 (diff) | |
download | binutils-7b3ecc7555438f05dda657d0ed6a43ee71a3901d.zip binutils-7b3ecc7555438f05dda657d0ed6a43ee71a3901d.tar.gz binutils-7b3ecc7555438f05dda657d0ed6a43ee71a3901d.tar.bz2 |
gdb: remove SYMBOL_OBJFILE_OWNED macro
Add a getter and a setter for whether a symbol is objfile owned. Remove
the corresponding macro and adjust all callers.
Change-Id: Ib7ef3718d65553ae924ca04c3fd478b0f4f3147c
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 2825697..ef9e653 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1115,7 +1115,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstack /* Class-initialization of bitfields is only allowed in C++20. */ : m_domain (UNDEF_DOMAIN), m_aclass_index (0), - is_objfile_owned (1), + m_is_objfile_owned (1), is_argument (0), is_inlined (0), maybe_copied (0), @@ -1168,6 +1168,16 @@ struct symbol : public general_symbol_info, public allocate_on_obstack m_domain = domain; } + bool is_objfile_owned () const + { + return m_is_objfile_owned; + } + + void set_is_objfile_owned (bool is_objfile_owned) + { + m_is_objfile_owned = is_objfile_owned; + } + /* Data type of value */ struct type *type = nullptr; @@ -1199,7 +1209,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstack /* If non-zero then symbol is objfile-owned, use owner.symtab. Otherwise symbol is arch-owned, use owner.arch. */ - unsigned int is_objfile_owned : 1; + unsigned int m_is_objfile_owned : 1; /* Whether this is an argument. */ @@ -1270,7 +1280,6 @@ struct block_symbol /* Note: There is no accessor macro for symbol.owner because it is "private". */ -#define SYMBOL_OBJFILE_OWNED(symbol) ((symbol)->is_objfile_owned) #define SYMBOL_IS_ARGUMENT(symbol) (symbol)->is_argument #define SYMBOL_INLINED(symbol) (symbol)->is_inlined #define SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION(symbol) \ |