diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-12-14 15:47:22 -0500 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-12-16 00:39:50 -0600 |
commit | 747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817 (patch) | |
tree | 1ce63753912e2acfad8c2937b342885150c853c3 /gdb/ada-exp.y | |
parent | 0d037fafed44c6704d0f15e8d49815caebcd7814 (diff) | |
download | gdb-747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817.zip gdb-747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817.tar.gz gdb-747cfc8c6bb23d40b3fa987f6c3df9d3a0d7b817.tar.bz2 |
Use symbol_set_language to set a symbol's language
Instead of using SYMBOL_LANGUAGE (sym) = foo.
Having only a single way to set a symbol's language is clearer and this
is also a requirement for making set_language a member function.
gdb/ChangeLog:
2019-12-15 Christian Biesinger <cbiesinger@google.com>
* ada-exp.y (write_ambiguous_var): Call symbol_set_language to
set the language of sym.
* language.c (language_alloc_type_symbol): Likewise.
Change-Id: I85338ea2e4121155f2da222fe0aa6b7d3ffe26f7
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r-- | gdb/ada-exp.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index 00020cd..6b1bdfa 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -1106,7 +1106,7 @@ write_ambiguous_var (struct parser_state *par_state, SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN; sym->set_linkage_name (obstack_strndup (&temp_parse_space, name, len)); - SYMBOL_LANGUAGE (sym) = language_ada; + symbol_set_language (sym, language_ada, nullptr); write_exp_elt_opcode (par_state, OP_VAR_VALUE); write_exp_elt_block (par_state, block); |