Skip to content

Commit

Permalink
[lldb][NFCI] Remove unused parameter from BreakpointResolver*::Create…
Browse files Browse the repository at this point in the history
…FromStructuredData (llvm#75374)

These appear to be unused.
  • Loading branch information
bulbazord authored Dec 15, 2023
1 parent b2cdf3c commit 7113c80
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 32 deletions.
3 changes: 1 addition & 2 deletions lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions lldb/include/lldb/Breakpoint/BreakpointResolverName.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions lldb/source/Breakpoint/BreakpointResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
5 changes: 2 additions & 3 deletions lldb/source/Breakpoint/BreakpointResolverAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down
5 changes: 2 additions & 3 deletions lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lldb/source/Breakpoint/BreakpointResolverName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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]);
Expand Down
7 changes: 3 additions & 4 deletions lldb/source/Breakpoint/BreakpointResolverScripted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down

0 comments on commit 7113c80

Please sign in to comment.