Author: jingham
Date: Wed Sep 14 14:05:27 2016
New Revision: 281519

URL: http://llvm.org/viewvc/llvm-project?rev=281519&view=rev
Log:
Fix some const-ness issues with BreakpointID & BreakpointIDList.

Modified:
    lldb/trunk/include/lldb/Breakpoint/BreakpointID.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h
    lldb/trunk/source/Breakpoint/BreakpointIDList.cpp

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointID.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointID.h?rev=281519&r1=281518&r2=281519&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointID.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointID.h Wed Sep 14 14:05:27 2016
@@ -30,9 +30,9 @@ public:
 
   virtual ~BreakpointID();
 
-  lldb::break_id_t GetBreakpointID() { return m_break_id; }
+  lldb::break_id_t GetBreakpointID() const { return m_break_id; }
 
-  lldb::break_id_t GetLocationID() { return m_location_id; }
+  lldb::break_id_t GetLocationID() const { return m_location_id; }
 
   void SetID(lldb::break_id_t bp_id, lldb::break_id_t loc_id) {
     m_break_id = bp_id;

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h?rev=281519&r1=281518&r2=281519&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h Wed Sep 14 14:05:27 
2016
@@ -34,9 +34,9 @@ public:
 
   virtual ~BreakpointIDList();
 
-  size_t GetSize();
+  size_t GetSize() const;
 
-  BreakpointID &GetBreakpointIDAtIndex(size_t index);
+  const BreakpointID &GetBreakpointIDAtIndex(size_t index) const;
 
   bool RemoveBreakpointIDAtIndex(size_t index);
 
@@ -46,9 +46,9 @@ public:
 
   bool AddBreakpointID(const char *bp_id);
 
-  bool FindBreakpointID(BreakpointID &bp_id, size_t *position);
+  bool FindBreakpointID(BreakpointID &bp_id, size_t *position) const;
 
-  bool FindBreakpointID(const char *bp_id, size_t *position);
+  bool FindBreakpointID(const char *bp_id, size_t *position) const;
 
   void InsertStringArray(const char **string_array, size_t array_size,
                          CommandReturnObject &result);

Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=281519&r1=281518&r2=281519&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Wed Sep 14 14:05:27 2016
@@ -31,9 +31,10 @@ BreakpointIDList::BreakpointIDList()
 
 BreakpointIDList::~BreakpointIDList() = default;
 
-size_t BreakpointIDList::GetSize() { return m_breakpoint_ids.size(); }
+size_t BreakpointIDList::GetSize() const { return m_breakpoint_ids.size(); }
 
-BreakpointID &BreakpointIDList::GetBreakpointIDAtIndex(size_t index) {
+const BreakpointID &
+BreakpointIDList::GetBreakpointIDAtIndex(size_t index) const {
   return ((index < m_breakpoint_ids.size()) ? m_breakpoint_ids[index]
                                             : m_invalid_id);
 }
@@ -71,7 +72,8 @@ bool BreakpointIDList::AddBreakpointID(c
   return success;
 }
 
-bool BreakpointIDList::FindBreakpointID(BreakpointID &bp_id, size_t *position) 
{
+bool BreakpointIDList::FindBreakpointID(BreakpointID &bp_id,
+                                        size_t *position) const {
   for (size_t i = 0; i < m_breakpoint_ids.size(); ++i) {
     BreakpointID tmp_id = m_breakpoint_ids[i];
     if (tmp_id.GetBreakpointID() == bp_id.GetBreakpointID() &&
@@ -85,7 +87,7 @@ bool BreakpointIDList::FindBreakpointID(
 }
 
 bool BreakpointIDList::FindBreakpointID(const char *bp_id_str,
-                                        size_t *position) {
+                                        size_t *position) const {
   BreakpointID temp_bp_id;
   break_id_t bp_id;
   break_id_t loc_id;


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to