]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/go-lang.c
gdb: Represent all languages as sub-classes of language_defn
[thirdparty/binutils-gdb.git] / gdb / go-lang.c
index c97db1b9db7fcb565e97bcb67825f5c218314820..f0b560803cd540813722ec7ad354bde46eca50c1 100644 (file)
@@ -576,7 +576,9 @@ go_language_arch_info (struct gdbarch *gdbarch,
   lai->bool_type_default = builtin->builtin_bool;
 }
 
-extern const struct language_defn go_language_defn =
+/* Constant data that describes the Go language.  */
+
+extern const struct language_data go_language_data =
 {
   "go",
   "Go",
@@ -626,6 +628,20 @@ extern const struct language_defn go_language_defn =
   "{...}"                      /* la_struct_too_deep_ellipsis */
 };
 
+/* Class representing the Go language.  */
+
+class go_language : public language_defn
+{
+public:
+  go_language ()
+    : language_defn (language_go, go_language_data)
+  { /* Nothing.  */ }
+};
+
+/* Single instance of the Go language class.  */
+
+static go_language go_language_defn;
+
 static void *
 build_go_types (struct gdbarch *gdbarch)
 {