Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / compile / compile-cplus-types.c
index e284ceb3e455eae5ab36ba459ee9a36915a9623d..3ef7d4c60a66c2bcfdc4c697cda4557e17dfbef9 100644 (file)
@@ -1,6 +1,6 @@
 /* Convert types from GDB to GCC
 
-   Copyright (C) 2014-2020 Free Software Foundation, Inc.
+   Copyright (C) 2014-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -91,7 +91,7 @@ get_method_access_flag (const struct type *type, int fni, int num)
   gdb_assert (type->code () == TYPE_CODE_STRUCT);
 
   /* If this type was not declared a class, everything is public.  */
-  if (!TYPE_DECLARED_CLASS (type))
+  if (!type->is_declared_class ())
     return GCC_CP_ACCESS_PUBLIC;
 
   /* Otherwise, read accessibility from the fn_field.  */
@@ -828,11 +828,11 @@ 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->is_declared_class () ? "class" : "struct";
 
       resuld = instance->plugin ().build_decl
        (what, name.get (), (GCC_CP_SYMBOL_CLASS | nested_access
-                            | (TYPE_DECLARED_CLASS (type)
+                            | (type->is_declared_class ()
                                ? GCC_CP_FLAG_CLASS_NOFLAG
                                : GCC_CP_FLAG_CLASS_IS_STRUCT)),
         0, nullptr, 0, filename, line);
@@ -970,10 +970,10 @@ compile_cplus_convert_func (compile_cplus_instance *instance,
      GDB's parser used to do.  */
   if (target_type == nullptr)
     {
-      if (TYPE_OBJFILE_OWNED (type))
-       target_type = objfile_type (TYPE_OWNER (type).objfile)->builtin_int;
+      if (type->is_objfile_owned ())
+       target_type = objfile_type (type->objfile_owner ())->builtin_int;
       else
-       target_type = builtin_type (TYPE_OWNER (type).gdbarch)->builtin_int;
+       target_type = builtin_type (type->arch_owner ())->builtin_int;
       warning (_("function has unknown return type; assuming int"));
     }
 
This page took 0.027239 seconds and 4 git commands to generate.