gnulib: define the path to gnulib's parent dir
[binutils-gdb.git] / gdb / f-array-walker.h
index c202df6c65fbacdf780a5e2c9ad1e330aaa0cda3..49a32be7530f69cd421668456fb8c52ad15067b6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2020 Free Software Foundation, Inc.
+/* Copyright (C) 2020-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -52,8 +52,8 @@ public:
       m_stride = type_length_units (elt_type);
     else
       {
-       struct gdbarch *arch = get_type_arch (elt_type);
-       int unit_size = gdbarch_addressable_memory_unit_size (arch);
+       int unit_size
+         = gdbarch_addressable_memory_unit_size (elt_type->arch ());
        m_stride /= (unit_size * 8);
       }
   };