[Lldb-commits] [lldb] [lldb] Add template method for getting const or mutable regs from DynamicRegisterInfo (PR #71402)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 6 12:42:55 PST 2023
================
@@ -89,12 +89,18 @@ class DynamicRegisterInfo {
GetRegisterInfo(llvm::StringRef reg_name) const;
typedef std::vector<lldb_private::RegisterInfo> reg_collection;
- llvm::iterator_range<reg_collection::const_iterator> registers() const {
- return llvm::iterator_range<reg_collection::const_iterator>(m_regs);
+
+ template <typename T> T registers();
----------------
bulbazord wrote:
Maybe explicitly delete the default non-specialized implementation? That would move an incorrect usage from a linker error to a compiler error (which is a little easier to reason about for most folks)
https://github.com/llvm/llvm-project/pull/71402
More information about the lldb-commits
mailing list