labath added a comment. Right, I see. The contained lists are going to make this trickier than I expected, and might even make the code more complicated. (Though this tradeoff will change if we ever end up with two optional regsets that need to mess with contained lists.)
Could we at least then structure the constructor code to avoid checking for SVE twice. Ideally, we would make this a two-step process: 1. select the "base" register list (either gpr+fpr, or gpr+fpr+sve) 2. add optional sets Something like: if (regsets & SVE) { m_register_set_p = reginfos_with_sve; // and similar for other variables } else { m_register_set_p = reginfos_without_sve; } if (regsets & Dynamic) { m_dynamic_reg_infos.assign(m_register_set_p, m_register_set_count) if (regsets & pauth) m_dynamic_reg_infos.insert(end(), g_pauth_registers); // or whatever m_register_set_p = m_dynamic_reg_infos.data(); // etc. } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96458/new/ https://reviews.llvm.org/D96458 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits