]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/d-lang.c
gdb: Represent all languages as sub-classes of language_defn
[thirdparty/binutils-gdb.git] / gdb / d-lang.c
index 951e664ceda107110246b8433212e9957f096a9c..c572ad7890e2c9611d14ca5440aa13a422a2f851 100644 (file)
@@ -205,7 +205,9 @@ static const char *d_extensions[] =
   ".d", NULL
 };
 
-extern const struct language_defn d_language_defn =
+/* Constant data that describes the D language.  */
+
+extern const struct language_data d_language_data =
 {
   "d",
   "D",
@@ -255,6 +257,20 @@ extern const struct language_defn d_language_defn =
   "{...}"                      /* la_struct_too_deep_ellipsis */
 };
 
+/* Class representing the D language.  */
+
+class d_language : public language_defn
+{
+public:
+  d_language ()
+    : language_defn (language_d, d_language_data)
+  { /* Nothing.  */ }
+};
+
+/* Single instance of the D language class.  */
+
+static d_language d_language_defn;
+
 /* Build all D language types for the specified architecture.  */
 
 static void *