[Lldb-commits] [lldb] [lldb] Change Breakpoint::AddName return value (PR #71236)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 3 15:33:00 PDT 2023
https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/71236
>From 1077476df553c21a88b1cbb80f7fc8635c88ff7f Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford at apple.com>
Date: Fri, 3 Nov 2023 14:37:07 -0700
Subject: [PATCH 1/2] [lldb] Change Breakpoint::AddName return value
The return value is completely unused. Let's just return nothing.
---
lldb/include/lldb/Breakpoint/Breakpoint.h | 2 +-
lldb/source/Breakpoint/Breakpoint.cpp | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lldb/include/lldb/Breakpoint/Breakpoint.h b/lldb/include/lldb/Breakpoint/Breakpoint.h
index f2380157f111dd6..1daaee6c043fc56 100644
--- a/lldb/include/lldb/Breakpoint/Breakpoint.h
+++ b/lldb/include/lldb/Breakpoint/Breakpoint.h
@@ -525,7 +525,7 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
private: // The target needs to manage adding & removing names. It will do the
// checking for name validity as well.
- bool AddName(llvm::StringRef new_name);
+ void AddName(llvm::StringRef new_name);
void RemoveName(const char *name_to_remove) {
if (name_to_remove)
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index ff4f195ea30909e..a94498a23a0fb27 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -841,9 +841,8 @@ bool Breakpoint::HasResolvedLocations() const {
size_t Breakpoint::GetNumLocations() const { return m_locations.GetSize(); }
-bool Breakpoint::AddName(llvm::StringRef new_name) {
+void Breakpoint::AddName(llvm::StringRef new_name) {
m_name_list.insert(new_name.str());
- return true;
}
void Breakpoint::GetDescription(Stream *s, lldb::DescriptionLevel level,
>From 033b67ac4671027c3e511c813501d753d8476f32 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford at apple.com>
Date: Fri, 3 Nov 2023 15:32:22 -0700
Subject: [PATCH 2/2] Remove incorrect comments
---
lldb/include/lldb/Breakpoint/Breakpoint.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lldb/include/lldb/Breakpoint/Breakpoint.h b/lldb/include/lldb/Breakpoint/Breakpoint.h
index 1daaee6c043fc56..3a8b29aee544c63 100644
--- a/lldb/include/lldb/Breakpoint/Breakpoint.h
+++ b/lldb/include/lldb/Breakpoint/Breakpoint.h
@@ -523,8 +523,7 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
lldb::SearchFilterSP GetSearchFilter() { return m_filter_sp; }
-private: // The target needs to manage adding & removing names. It will do the
- // checking for name validity as well.
+private:
void AddName(llvm::StringRef new_name);
void RemoveName(const char *name_to_remove) {
More information about the lldb-commits
mailing list