+2020-09-16 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * ada-lang.c (ada_language_data): Remove la_language initializer.
+ * c-lang.c (c_language_data): Likewise.
+ (cplus_language_data): Likewise.
+ (asm_language_data): Likewise.
+ (minimal_language_data): Likewise.
+ * d-lang.c (d_language_data): Likewise.
+ * f-lang.c (f_language_data): Likewise.
+ * go-lang.c (go_language_data): Likewise.
+ * language.c (unknown_language_data): Likewise.
+ (auto_language_data): Likewise.
+ * language.h (language_data): Remove la_language field.
+ (language_defn::language_defn): Initialise la_language field.
+ (language_defn::la_language): New member variable.
+ * m2-lang.c (m2_language_data): Remove la_language field.
+ * objc-lang.c (objc_language_data): Likewise.
+ * opencl-lang.c (opencl_language_data): Likewise.
+ * p-lang.c (pascal_language_data): Likewise.
+ * rust-lang.c (rust_language_data): Likewise.
+
2020-09-16 Andrew Burgess <andrew.burgess@embecosm.com>
* ada-lang.c (ada_extensions): Delete, moved into
extern const struct language_data ada_language_data =
{
- language_ada,
range_check_off,
case_sensitive_on, /* Yes, Ada is case-insensitive, but
that's not quite what this means. */
extern const struct language_data c_language_data =
{
- language_c,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data cplus_language_data =
{
- language_cplus,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data asm_language_data =
{
- language_asm,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data minimal_language_data =
{
- language_minimal,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data d_language_data =
{
- language_d,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data f_language_data =
{
- language_fortran,
range_check_on,
case_sensitive_off,
array_column_major,
extern const struct language_data go_language_data =
{
- language_go,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data unknown_language_data =
{
- language_unknown,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data auto_language_data =
{
- language_auto,
range_check_off,
case_sensitive_on,
array_row_major,
struct language_data
{
- /* its symtab language-enum (defs.h). */
-
- enum language la_language;
-
/* Default range checking. */
enum range_check la_range_check;
struct language_defn : language_data
{
language_defn (enum language lang, const language_data &init_data)
- : language_data (init_data)
+ : language_data (init_data),
+ la_language (lang)
{
/* We should only ever create one instance of each language. */
gdb_assert (languages[lang] == nullptr);
languages[lang] = this;
}
+ /* Which language this is. */
+
+ const enum language la_language;
+
/* Name of the language. */
virtual const char *name () const = 0;
extern const struct language_data m2_language_data =
{
- language_m2,
range_check_on,
case_sensitive_on,
array_row_major,
extern const struct language_data objc_language_data =
{
- language_objc,
range_check_off,
case_sensitive_on,
array_row_major,
/* Constant data representing the OpenCL language. */
extern const struct language_data opencl_language_data =
{
- language_opencl,
range_check_off,
case_sensitive_on,
array_row_major,
extern const struct language_data pascal_language_data =
{
- language_pascal,
range_check_on,
case_sensitive_on,
array_row_major,
extern const struct language_data rust_language_data =
{
- language_rust,
range_check_on,
case_sensitive_on,
array_row_major,