aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-20 08:47:30 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-02-06 16:03:44 -0500
commit1ee2e9f9304d05f2962bbc4b83096b850fe4e433 (patch)
tree5df392b5191f79e7193b0d53cfb03c77233abeb7 /gdb/symtab.h
parent5b6074611edfdd1590e8da1ca443950b47942bbb (diff)
downloadgdb-1ee2e9f9304d05f2962bbc4b83096b850fe4e433.zip
gdb-1ee2e9f9304d05f2962bbc4b83096b850fe4e433.tar.gz
gdb-1ee2e9f9304d05f2962bbc4b83096b850fe4e433.tar.bz2
gdb: remove SYMTAB_LANGUAGE macro, add getter/setter
Add a getter and a setter for a symtab's language. Remove the corresponding macro and adjust all callers. Change-Id: I9f4d840b11c19f80f39bac1bce020fdd1739e11f
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 8881f4e..2830969 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1393,6 +1393,16 @@ struct symtab
m_linetable = linetable;
}
+ enum language language () const
+ {
+ return m_language;
+ }
+
+ void set_language (enum language language)
+ {
+ m_language = language;
+ }
+
/* Unordered chain of all filetabs in the compunit, with the exception
that the "main" source file is the first entry in the list. */
@@ -1413,7 +1423,7 @@ struct symtab
/* Language of this source file. */
- enum language language;
+ enum language m_language;
/* Full name of file as found by searching the source path.
NULL if not yet known. */
@@ -1425,7 +1435,6 @@ struct symtab
using symtab_range = next_range<symtab>;
-#define SYMTAB_LANGUAGE(symtab) ((symtab)->language)
#define SYMTAB_BLOCKVECTOR(symtab) \
(symtab->compunit ()->blockvector ())
#define SYMTAB_OBJFILE(symtab) \