gdb: Convert language la_read_var_value field to a method
[deliverable/binutils-gdb.git] / gdb / opencl-lang.c
index d686c6ea922149b3ff2513bc07f128cbf8c11b82..c1c498c7377fd028ff7f0cf6320faf936761ab1e 100644 (file)
@@ -1008,7 +1008,7 @@ opencl_print_type (struct type *type, const char *varstring,
     {
       type = check_typedef (type);
       if (type->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type)
-         && TYPE_NAME (type) != NULL)
+         && type->name () != NULL)
        show = 0;
     }
 
@@ -1042,7 +1042,8 @@ const struct exp_descriptor exp_descriptor_opencl =
   evaluate_subexp_opencl
 };
 
-extern const struct language_defn opencl_language_defn =
+/* Constant data representing the OpenCL language.  */
+extern const struct language_data opencl_language_data =
 {
   "opencl",                    /* Language name */
   "OpenCL C",
@@ -1062,7 +1063,6 @@ extern const struct language_defn opencl_language_defn =
   c_print_typedef,             /* Print a typedef using appropriate syntax */
   c_value_print_inner,         /* la_value_print_inner */
   c_value_print,               /* Print a top-level value */
-  default_read_var_value,      /* la_read_var_value */
   NULL,                                /* Language specific skip_trampoline */
   NULL,                         /* name_of_this */
   false,                       /* la_store_sym_names_in_linkage_form_p */
@@ -1078,7 +1078,6 @@ extern const struct language_defn opencl_language_defn =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   opencl_language_arch_info,
-  default_print_array_index,
   default_pass_by_reference,
   c_watch_location_expression,
   NULL,                                /* la_get_symbol_name_matcher */
@@ -1091,6 +1090,20 @@ extern const struct language_defn opencl_language_defn =
   "{...}"                      /* la_struct_too_deep_ellipsis */
 };
 
+/* Class representing the OpenCL language.  */
+
+class opencl_language : public language_defn
+{
+public:
+  opencl_language ()
+    : language_defn (language_opencl, opencl_language_data)
+  { /* Nothing.  */ }
+};
+
+/* Single instance of the OpenCL language class.  */
+
+static opencl_language opencl_language_defn;
+
 static void *
 build_opencl_types (struct gdbarch *gdbarch)
 {
This page took 0.026089 seconds and 4 git commands to generate.