diff options
author | Tom Tromey <tromey@adacore.com> | 2023-03-01 08:03:49 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-03-01 15:33:03 -0700 |
commit | 5f27603700c0d89023f00b6521b36cc911c23f85 (patch) | |
tree | 46042eee0d83bd584e2a36612b6c2db50428bc54 /gdb/gdbtypes.h | |
parent | 802dace16f8c6dfa3200381669015a7dccbd5e28 (diff) | |
download | gdb-5f27603700c0d89023f00b6521b36cc911c23f85.zip gdb-5f27603700c0d89023f00b6521b36cc911c23f85.tar.gz gdb-5f27603700c0d89023f00b6521b36cc911c23f85.tar.bz2 |
Use const for dwarf2_property_baton
Once a baton is stored in a struct type, it doesn't make sense to
modify it. This patch constifies the API.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 701a64d..c4889a4 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -290,7 +290,7 @@ union dynamic_prop_data /* Storage for dynamic property. */ - dwarf2_property_baton *baton; + const dwarf2_property_baton *baton; /* Storage of variant parts for a type. A type with variant parts has all its fields "linearized" -- stored in a single field @@ -340,7 +340,7 @@ struct dynamic_prop m_data.const_val = const_val; } - dwarf2_property_baton *baton () const + const dwarf2_property_baton *baton () const { gdb_assert (m_kind == PROP_LOCEXPR || m_kind == PROP_LOCLIST @@ -349,19 +349,19 @@ struct dynamic_prop return m_data.baton; } - void set_locexpr (dwarf2_property_baton *baton) + void set_locexpr (const dwarf2_property_baton *baton) { m_kind = PROP_LOCEXPR; m_data.baton = baton; } - void set_loclist (dwarf2_property_baton *baton) + void set_loclist (const dwarf2_property_baton *baton) { m_kind = PROP_LOCLIST; m_data.baton = baton; } - void set_addr_offset (dwarf2_property_baton *baton) + void set_addr_offset (const dwarf2_property_baton *baton) { m_kind = PROP_ADDR_OFFSET; m_data.baton = baton; |