[Lldb-commits] [lldb] [lldb][NFCI] Remove unused parameter from BreakpointResolver*::CreateFromStructuredData (PR #75374)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 13 12:17:18 PST 2023
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/75374
These appear to be unused.
>From e00884c8a9e6010b339932a9bff840634462beb7 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford at apple.com>
Date: Wed, 13 Dec 2023 11:35:49 -0800
Subject: [PATCH] [lldb][NFCI] Remove unused parameter from
BreakpointResolver*::CreateFromStructuredData
These appear to be unused.
---
.../lldb/Breakpoint/BreakpointResolverAddress.h | 3 +--
.../lldb/Breakpoint/BreakpointResolverFileLine.h | 3 +--
.../lldb/Breakpoint/BreakpointResolverFileRegex.h | 3 +--
lldb/include/lldb/Breakpoint/BreakpointResolverName.h | 3 +--
.../lldb/Breakpoint/BreakpointResolverScripted.h | 3 +--
lldb/source/Breakpoint/BreakpointResolver.cpp | 10 +++++-----
lldb/source/Breakpoint/BreakpointResolverAddress.cpp | 5 ++---
lldb/source/Breakpoint/BreakpointResolverFileLine.cpp | 5 ++---
lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp | 5 ++---
lldb/source/Breakpoint/BreakpointResolverName.cpp | 8 ++++----
lldb/source/Breakpoint/BreakpointResolverScripted.cpp | 7 +++----
11 files changed, 23 insertions(+), 32 deletions(-)
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h b/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
index 03ae69acae4c4f..3a09892f3f1943 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
@@ -31,8 +31,7 @@ class BreakpointResolverAddress : public BreakpointResolver {
~BreakpointResolverAddress() override = default;
static lldb::BreakpointResolverSP
- CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
- const StructuredData::Dictionary &options_dict,
+ CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h b/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
index 7635729c50a6e0..610d81727c6c6a 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
@@ -28,8 +28,7 @@ class BreakpointResolverFileLine : public BreakpointResolver {
std::optional<llvm::StringRef> removed_prefix_opt = std::nullopt);
static lldb::BreakpointResolverSP
- CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
- const StructuredData::Dictionary &data_dict,
+ CreateFromStructuredData(const StructuredData::Dictionary &data_dict,
Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h b/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
index 43e1217c13d5ef..1dcdba91a5a8d5 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
@@ -28,8 +28,7 @@ class BreakpointResolverFileRegex : public BreakpointResolver {
const std::unordered_set<std::string> &func_name_set, bool exact_match);
static lldb::BreakpointResolverSP
- CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
- const StructuredData::Dictionary &options_dict,
+ CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverName.h b/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
index 94b19db3085d76..c83814c174e883 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
@@ -51,8 +51,7 @@ class BreakpointResolverName : public BreakpointResolver {
bool skip_prologue);
static lldb::BreakpointResolverSP
- CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
- const StructuredData::Dictionary &data_dict,
+ CreateFromStructuredData(const StructuredData::Dictionary &data_dict,
Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h b/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
index c0bbc1c2bafb70..133fa8058637bb 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
@@ -31,8 +31,7 @@ class BreakpointResolverScripted : public BreakpointResolver {
~BreakpointResolverScripted() override = default;
static lldb::BreakpointResolverSP
- CreateFromStructuredData(const lldb::BreakpointSP &bkpt,
- const StructuredData::Dictionary &options_dict,
+ CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/lldb/source/Breakpoint/BreakpointResolver.cpp b/lldb/source/Breakpoint/BreakpointResolver.cpp
index 60406bdc44625d..89ea308b1eb070 100644
--- a/lldb/source/Breakpoint/BreakpointResolver.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolver.cpp
@@ -113,23 +113,23 @@ BreakpointResolverSP BreakpointResolver::CreateFromStructuredData(
switch (resolver_type) {
case FileLineResolver:
result_sp = BreakpointResolverFileLine::CreateFromStructuredData(
- nullptr, *subclass_options, error);
+ *subclass_options, error);
break;
case AddressResolver:
result_sp = BreakpointResolverAddress::CreateFromStructuredData(
- nullptr, *subclass_options, error);
+ *subclass_options, error);
break;
case NameResolver:
result_sp = BreakpointResolverName::CreateFromStructuredData(
- nullptr, *subclass_options, error);
+ *subclass_options, error);
break;
case FileRegexResolver:
result_sp = BreakpointResolverFileRegex::CreateFromStructuredData(
- nullptr, *subclass_options, error);
+ *subclass_options, error);
break;
case PythonResolver:
result_sp = BreakpointResolverScripted::CreateFromStructuredData(
- nullptr, *subclass_options, error);
+ *subclass_options, error);
break;
case ExceptionResolver:
error.SetErrorString("Exception resolvers are hard.");
diff --git a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
index 19fc81a28a7f4a..a0c628a8e299ce 100644
--- a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
@@ -31,8 +31,7 @@ BreakpointResolverAddress::BreakpointResolverAddress(const BreakpointSP &bkpt,
m_addr(addr), m_resolved_addr(LLDB_INVALID_ADDRESS) {}
BreakpointResolverSP BreakpointResolverAddress::CreateFromStructuredData(
- const BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict,
- Status &error) {
+ const StructuredData::Dictionary &options_dict, Status &error) {
llvm::StringRef module_name;
lldb::offset_t addr_offset;
FileSpec module_filespec;
@@ -56,7 +55,7 @@ BreakpointResolverSP BreakpointResolverAddress::CreateFromStructuredData(
}
module_filespec.SetFile(module_name, FileSpec::Style::native);
}
- return std::make_shared<BreakpointResolverAddress>(bkpt, address,
+ return std::make_shared<BreakpointResolverAddress>(nullptr, address,
module_filespec);
}
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
index c28b78a0056f9a..61bef498438bdd 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -31,8 +31,7 @@ BreakpointResolverFileLine::BreakpointResolverFileLine(
m_removed_prefix_opt(removed_prefix_opt) {}
BreakpointResolverSP BreakpointResolverFileLine::CreateFromStructuredData(
- const BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict,
- Status &error) {
+ const StructuredData::Dictionary &options_dict, Status &error) {
llvm::StringRef filename;
uint32_t line;
uint16_t column;
@@ -91,7 +90,7 @@ BreakpointResolverSP BreakpointResolverFileLine::CreateFromStructuredData(
return nullptr;
return std::make_shared<BreakpointResolverFileLine>(
- bkpt, offset, skip_prologue, location_spec);
+ nullptr, offset, skip_prologue, location_spec);
}
StructuredData::ObjectSP
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index 13c7f17fd807ee..06d346afb9f620 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -27,7 +27,6 @@ BreakpointResolverFileRegex::BreakpointResolverFileRegex(
m_function_names(func_names) {}
BreakpointResolverSP BreakpointResolverFileRegex::CreateFromStructuredData(
- const lldb::BreakpointSP &bkpt,
const StructuredData::Dictionary &options_dict, Status &error) {
bool success;
@@ -67,8 +66,8 @@ BreakpointResolverSP BreakpointResolverFileRegex::CreateFromStructuredData(
}
}
- return std::make_shared<BreakpointResolverFileRegex>(bkpt, std::move(regex),
- names_set, exact_match);
+ return std::make_shared<BreakpointResolverFileRegex>(
+ nullptr, std::move(regex), names_set, exact_match);
}
StructuredData::ObjectSP
diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index 0097046cf511b5..82eef43ad6cfd2 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -87,8 +87,7 @@ BreakpointResolverName::BreakpointResolverName(
m_language(rhs.m_language), m_skip_prologue(rhs.m_skip_prologue) {}
BreakpointResolverSP BreakpointResolverName::CreateFromStructuredData(
- const BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict,
- Status &error) {
+ const StructuredData::Dictionary &options_dict, Status &error) {
LanguageType language = eLanguageTypeUnknown;
llvm::StringRef language_name;
bool success = options_dict.GetValueForKeyAsString(
@@ -123,7 +122,8 @@ BreakpointResolverSP BreakpointResolverName::CreateFromStructuredData(
GetKey(OptionNames::RegexString), regex_text);
if (success) {
return std::make_shared<BreakpointResolverName>(
- bkpt, RegularExpression(regex_text), language, offset, skip_prologue);
+ nullptr, RegularExpression(regex_text), language, offset,
+ skip_prologue);
} else {
StructuredData::Array *names_array;
success = options_dict.GetValueForKeyAsArray(
@@ -173,7 +173,7 @@ BreakpointResolverSP BreakpointResolverName::CreateFromStructuredData(
std::shared_ptr<BreakpointResolverName> resolver_sp =
std::make_shared<BreakpointResolverName>(
- bkpt, names[0].c_str(), name_masks[0], language,
+ nullptr, names[0].c_str(), name_masks[0], language,
Breakpoint::MatchType::Exact, offset, skip_prologue);
for (size_t i = 1; i < num_elem; i++) {
resolver_sp->AddNameLookup(ConstString(names[i]), name_masks[i]);
diff --git a/lldb/source/Breakpoint/BreakpointResolverScripted.cpp b/lldb/source/Breakpoint/BreakpointResolverScripted.cpp
index 664ce4d573f943..dbfa8b8572f2ab 100644
--- a/lldb/source/Breakpoint/BreakpointResolverScripted.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverScripted.cpp
@@ -59,8 +59,7 @@ void BreakpointResolverScripted::NotifyBreakpointSet() {
}
BreakpointResolverSP BreakpointResolverScripted::CreateFromStructuredData(
- const BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict,
- Status &error) {
+ const StructuredData::Dictionary &options_dict, Status &error) {
llvm::StringRef class_name;
bool success;
@@ -79,8 +78,8 @@ BreakpointResolverSP BreakpointResolverScripted::CreateFromStructuredData(
if (options_dict.GetValueForKeyAsDictionary(GetKey(OptionNames::ScriptArgs),
args_dict))
args_data_impl.SetObjectSP(args_dict->shared_from_this());
- return std::make_shared<BreakpointResolverScripted>(bkpt, class_name, depth,
- args_data_impl);
+ return std::make_shared<BreakpointResolverScripted>(nullptr, class_name,
+ depth, args_data_impl);
}
StructuredData::ObjectSP
More information about the lldb-commits
mailing list