[Lldb-commits] [lldb] [lldb][AArch64][Linux] Add field information for the CPSR register (PR #70300)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 7 16:15:04 PST 2023


================
@@ -62,7 +62,10 @@ struct RegisterInfo {
   /// rax ax, ah, and al.
   uint32_t *invalidate_regs;
   /// If not nullptr, a type defined by XML descriptions.
-  const RegisterFlags *flags_type;
+  /// This is mutable so that it may be updated after the register info tables
+  /// have been constructed. For example a specific target OS may have a
+  /// different layout.
+  mutable const RegisterFlags *flags_type;
----------------
jasonmolenda wrote:

I've never used `mutable`, but declaring an ivar `mutable const` doesn't make sense to me.  I understand that marking an ivar `mutable` means a method marked `const` can still modify it, fine I'm sure that's useful.  But I don't see why marking this `mutable const` is about?

https://github.com/llvm/llvm-project/pull/70300


More information about the lldb-commits mailing list