diff options
author | Tom Tromey <tom@tromey.com> | 2020-03-26 09:28:08 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-03-26 09:28:15 -0600 |
commit | 8844c11b8bc1cfa70a63a8875e08345c96abecfe (patch) | |
tree | 0d179a74826a2d344353febd311591f9af2a7ac5 /gdb/dwarf2/line-header.c | |
parent | c90ec28ae44ebf72d57d58439d02fc5aab90f1f6 (diff) | |
download | binutils-gdb-8844c11b8bc1cfa70a63a8875e08345c96abecfe.tar.gz |
Make some line_header methods const
This changes a few line_header methods to be const. In some cases, a
const overload is added.
gdb/ChangeLog
2020-03-26 Tom Tromey <tom@tromey.com>
* dwarf2/line-header.h (struct line_header) <is_valid_file_index,
file_names_size, file_full_name, file_file_name>: Use const.
<file_name_at, file_names>: Add const overload.
* dwarf2/line-header.c (line_header::file_file_name)
(line_header::file_full_name): Update.
Diffstat (limited to 'gdb/dwarf2/line-header.c')
-rw-r--r-- | gdb/dwarf2/line-header.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2/line-header.c b/gdb/dwarf2/line-header.c index 56dfb5c2dd2..f417f2d0fae 100644 --- a/gdb/dwarf2/line-header.c +++ b/gdb/dwarf2/line-header.c @@ -59,7 +59,7 @@ line_header::add_file_name (const char *name, } gdb::unique_xmalloc_ptr<char> -line_header::file_file_name (int file) +line_header::file_file_name (int file) const { /* Is the file number a valid index into the line header's file name table? Remember that file numbers start with one, not zero. */ @@ -95,7 +95,7 @@ line_header::file_file_name (int file) } gdb::unique_xmalloc_ptr<char> -line_header::file_full_name (int file, const char *comp_dir) +line_header::file_full_name (int file, const char *comp_dir) const { /* Is the file number a valid index into the line header's file name table? Remember that file numbers start with one, not zero. */ |