[Lldb-commits] [lldb] 36195d7 - [lldb] [DynamicRegisterInfo] Remove non-const GetRegisterInfoAtIndex()

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 11 03:22:47 PDT 2021


Author: Michał Górny
Date: 2021-10-11T12:08:38+02:00
New Revision: 36195d7d80e37063ef7f1fbc6c1970e515bb502c

URL: https://github.com/llvm/llvm-project/commit/36195d7d80e37063ef7f1fbc6c1970e515bb502c
DIFF: https://github.com/llvm/llvm-project/commit/36195d7d80e37063ef7f1fbc6c1970e515bb502c.diff

LOG: [lldb] [DynamicRegisterInfo] Remove non-const GetRegisterInfoAtIndex()

Differential Revision: https://reviews.llvm.org/D111408

Added: 
    

Modified: 
    lldb/include/lldb/Target/DynamicRegisterInfo.h
    lldb/source/Target/DynamicRegisterInfo.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Target/DynamicRegisterInfo.h b/lldb/include/lldb/Target/DynamicRegisterInfo.h
index 99cf5e237edcb..1bc6b1dccc296 100644
--- a/lldb/include/lldb/Target/DynamicRegisterInfo.h
+++ b/lldb/include/lldb/Target/DynamicRegisterInfo.h
@@ -55,8 +55,6 @@ class DynamicRegisterInfo {
 
   const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(uint32_t i) const;
 
-  lldb_private::RegisterInfo *GetRegisterInfoAtIndex(uint32_t i);
-
   const lldb_private::RegisterSet *GetRegisterSet(uint32_t i) const;
 
   uint32_t GetRegisterSetIndexByName(lldb_private::ConstString &set_name,

diff  --git a/lldb/source/Target/DynamicRegisterInfo.cpp b/lldb/source/Target/DynamicRegisterInfo.cpp
index 396a13d6add40..cbd4885ec7bfe 100644
--- a/lldb/source/Target/DynamicRegisterInfo.cpp
+++ b/lldb/source/Target/DynamicRegisterInfo.cpp
@@ -691,12 +691,6 @@ DynamicRegisterInfo::GetRegisterInfoAtIndex(uint32_t i) const {
   return nullptr;
 }
 
-RegisterInfo *DynamicRegisterInfo::GetRegisterInfoAtIndex(uint32_t i) {
-  if (i < m_regs.size())
-    return &m_regs[i];
-  return nullptr;
-}
-
 const RegisterInfo *DynamicRegisterInfo::GetRegisterInfo(uint32_t kind,
                                                          uint32_t num) const {
   uint32_t reg_index = ConvertRegisterKindToRegisterNumber(kind, num);


        


More information about the lldb-commits mailing list