[Lldb-commits] [lldb] 7fb0679 - [lldb][NFC] Remove unused parameter
Tatyana Krasnukha via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 18 02:49:34 PST 2020
Author: Tatyana Krasnukha
Date: 2020-02-18T13:49:08+03:00
New Revision: 7fb06796abfd54878378b65456d567169d409bb3
URL: https://github.com/llvm/llvm-project/commit/7fb06796abfd54878378b65456d567169d409bb3
DIFF: https://github.com/llvm/llvm-project/commit/7fb06796abfd54878378b65456d567169d409bb3.diff
LOG: [lldb][NFC] Remove unused parameter
Rename search-filter's CopyForBreakpoint to CreateCopy, since they don't
do anything with breakpoints.
Added:
Modified:
lldb/include/lldb/Core/SearchFilter.h
lldb/include/lldb/Target/LanguageRuntime.h
lldb/source/Breakpoint/Breakpoint.cpp
lldb/source/Core/SearchFilter.cpp
lldb/source/Target/LanguageRuntime.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/SearchFilter.h b/lldb/include/lldb/Core/SearchFilter.h
index 8846ec0cf922..178489a88f3d 100644
--- a/lldb/include/lldb/Core/SearchFilter.h
+++ b/lldb/include/lldb/Core/SearchFilter.h
@@ -187,7 +187,7 @@ class SearchFilter {
/// Standard "Dump" method. At present it does nothing.
virtual void Dump(Stream *s) const;
- lldb::SearchFilterSP CopyForBreakpoint(Breakpoint &breakpoint);
+ lldb::SearchFilterSP CreateCopy(lldb::TargetSP& target_sp);
static lldb::SearchFilterSP
CreateFromStructuredData(const lldb::TargetSP& target_sp,
@@ -261,13 +261,13 @@ class SearchFilter {
const SymbolContext &context,
Searcher &searcher);
- virtual lldb::SearchFilterSP DoCopyForBreakpoint(Breakpoint &breakpoint) = 0;
+ virtual lldb::SearchFilterSP DoCreateCopy() = 0;
void SetTarget(lldb::TargetSP &target_sp) { m_target_sp = target_sp; }
- lldb::TargetSP
- m_target_sp; // Every filter has to be associated with a target for
- // now since you need a starting place for the search.
+ lldb::TargetSP m_target_sp; // Every filter has to be associated with
+ // a target for now since you need a starting
+ // place for the search.
private:
unsigned char SubclassID;
};
@@ -295,7 +295,7 @@ class SearchFilterForUnconstrainedSearches : public SearchFilter {
StructuredData::ObjectSP SerializeToStructuredData() override;
protected:
- lldb::SearchFilterSP DoCopyForBreakpoint(Breakpoint &breakpoint) override;
+ lldb::SearchFilterSP DoCreateCopy() override;
};
/// \class SearchFilterByModule SearchFilter.h "lldb/Core/SearchFilter.h" This
@@ -341,7 +341,7 @@ class SearchFilterByModule : public SearchFilter {
StructuredData::ObjectSP SerializeToStructuredData() override;
protected:
- lldb::SearchFilterSP DoCopyForBreakpoint(Breakpoint &breakpoint) override;
+ lldb::SearchFilterSP DoCreateCopy() override;
private:
FileSpec m_module_spec;
@@ -394,7 +394,7 @@ class SearchFilterByModuleList : public SearchFilter {
void SerializeUnwrapped(StructuredData::DictionarySP &options_dict_sp);
protected:
- lldb::SearchFilterSP DoCopyForBreakpoint(Breakpoint &breakpoint) override;
+ lldb::SearchFilterSP DoCreateCopy() override;
protected:
FileSpecList m_module_spec_list;
@@ -432,7 +432,7 @@ class SearchFilterByModuleListAndCU : public SearchFilterByModuleList {
StructuredData::ObjectSP SerializeToStructuredData() override;
protected:
- lldb::SearchFilterSP DoCopyForBreakpoint(Breakpoint &breakpoint) override;
+ lldb::SearchFilterSP DoCreateCopy() override;
private:
FileSpecList m_cu_spec_list;
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index aa132d35c0dd..2a792fe519d0 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -51,7 +51,7 @@ class ExceptionSearchFilter : public SearchFilter {
LanguageRuntime *m_language_runtime;
lldb::SearchFilterSP m_filter_sp;
- lldb::SearchFilterSP DoCopyForBreakpoint(Breakpoint &breakpoint) override;
+ lldb::SearchFilterSP DoCreateCopy() override;
void UpdateModuleListIfNeeded();
};
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index 09122cfc2bfa..ec6700ea2bb1 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -74,7 +74,7 @@ BreakpointSP Breakpoint::CopyFromBreakpoint(TargetSP new_target,
BreakpointSP bp(new Breakpoint(*new_target, bp_to_copy_from));
// Now go through and copy the filter & resolver:
bp->m_resolver_sp = bp_to_copy_from.m_resolver_sp->CopyForBreakpoint(*bp);
- bp->m_filter_sp = bp_to_copy_from.m_filter_sp->CopyForBreakpoint(*bp);
+ bp->m_filter_sp = bp_to_copy_from.m_filter_sp->CreateCopy(new_target);
return bp;
}
diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp
index a42fa968656f..494e88dde267 100644
--- a/lldb/source/Core/SearchFilter.cpp
+++ b/lldb/source/Core/SearchFilter.cpp
@@ -161,9 +161,8 @@ void SearchFilter::GetDescription(Stream *s) {}
void SearchFilter::Dump(Stream *s) const {}
-lldb::SearchFilterSP SearchFilter::CopyForBreakpoint(Breakpoint &breakpoint) {
- SearchFilterSP ret_sp = DoCopyForBreakpoint(breakpoint);
- TargetSP target_sp = breakpoint.GetTargetSP();
+lldb::SearchFilterSP SearchFilter::CreateCopy(lldb::TargetSP& target_sp) {
+ SearchFilterSP ret_sp = DoCreateCopy();
ret_sp->SetTarget(target_sp);
return ret_sp;
}
@@ -391,8 +390,7 @@ bool SearchFilterForUnconstrainedSearches::ModulePasses(
return true;
}
-lldb::SearchFilterSP SearchFilterForUnconstrainedSearches::DoCopyForBreakpoint(
- Breakpoint &breakpoint) {
+SearchFilterSP SearchFilterForUnconstrainedSearches::DoCreateCopy() {
return std::make_shared<SearchFilterForUnconstrainedSearches>(*this);
}
@@ -467,8 +465,7 @@ uint32_t SearchFilterByModule::GetFilterRequiredItems() {
void SearchFilterByModule::Dump(Stream *s) const {}
-lldb::SearchFilterSP
-SearchFilterByModule::DoCopyForBreakpoint(Breakpoint &breakpoint) {
+SearchFilterSP SearchFilterByModule::DoCreateCopy() {
return std::make_shared<SearchFilterByModule>(*this);
}
@@ -612,8 +609,7 @@ uint32_t SearchFilterByModuleList::GetFilterRequiredItems() {
void SearchFilterByModuleList::Dump(Stream *s) const {}
-lldb::SearchFilterSP
-SearchFilterByModuleList::DoCopyForBreakpoint(Breakpoint &breakpoint) {
+lldb::SearchFilterSP SearchFilterByModuleList::DoCreateCopy() {
return std::make_shared<SearchFilterByModuleList>(*this);
}
@@ -834,7 +830,6 @@ uint32_t SearchFilterByModuleListAndCU::GetFilterRequiredItems() {
void SearchFilterByModuleListAndCU::Dump(Stream *s) const {}
-lldb::SearchFilterSP
-SearchFilterByModuleListAndCU::DoCopyForBreakpoint(Breakpoint &breakpoint) {
+SearchFilterSP SearchFilterByModuleListAndCU::DoCreateCopy() {
return std::make_shared<SearchFilterByModuleListAndCU>(*this);
}
diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp
index eabb124d1df2..f7d445997fad 100644
--- a/lldb/source/Target/LanguageRuntime.cpp
+++ b/lldb/source/Target/LanguageRuntime.cpp
@@ -78,8 +78,7 @@ void ExceptionSearchFilter::UpdateModuleListIfNeeded() {
}
}
-SearchFilterSP
-ExceptionSearchFilter::DoCopyForBreakpoint(Breakpoint &breakpoint) {
+SearchFilterSP ExceptionSearchFilter::DoCreateCopy() {
return SearchFilterSP(
new ExceptionSearchFilter(TargetSP(), m_language, false));
}
More information about the lldb-commits
mailing list