Fix TYPE_DECLARED_CLASS thinko
[deliverable/binutils-gdb.git] / gdb / compile / compile-cplus-types.c
index 0f32b0e1adea0e22fac43098a7186fc304e67a09..ef5fbcf133a107c5b9c83c7080f98fe0e50f94fc 100644 (file)
@@ -828,7 +828,7 @@ compile_cplus_convert_struct_or_union (compile_cplus_instance *instance,
   gcc_decl resuld;
   if (type->code () == TYPE_CODE_STRUCT)
     {
-      const char *what = TYPE_DECLARED_CLASS (type) ? "struct" : "class";
+      const char *what = TYPE_DECLARED_CLASS (type) ? "class" : "struct";
 
       resuld = instance->plugin ().build_decl
        (what, name.get (), (GCC_CP_SYMBOL_CLASS | nested_access
@@ -971,9 +971,9 @@ compile_cplus_convert_func (compile_cplus_instance *instance,
   if (target_type == nullptr)
     {
       if (type->is_objfile_owned ())
-       target_type = objfile_type (type->objfile ())->builtin_int;
+       target_type = objfile_type (type->objfile_owner ())->builtin_int;
       else
-       target_type = builtin_type (type->arch ())->builtin_int;
+       target_type = builtin_type (type->arch_owner ())->builtin_int;
       warning (_("function has unknown return type; assuming int"));
     }
 
This page took 0.022945 seconds and 4 git commands to generate.