[Lldb-commits] [lldb] 9442e81 - [lldb][NFCI] Remove ConstString from Process::ConfigureStructuredData
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 26 11:12:17 PDT 2023
Author: Alex Langford
Date: 2023-06-26T11:09:09-07:00
New Revision: 9442e81f02a7e83132432269c9ada7c03eab7a38
URL: https://github.com/llvm/llvm-project/commit/9442e81f02a7e83132432269c9ada7c03eab7a38
DIFF: https://github.com/llvm/llvm-project/commit/9442e81f02a7e83132432269c9ada7c03eab7a38.diff
LOG: [lldb][NFCI] Remove ConstString from Process::ConfigureStructuredData
This is a follow-up to b4827a3c0a7ef121ca376713e115b04eff0f5194.
Differential Revision: https://reviews.llvm.org/D153675
Added:
Modified:
lldb/include/lldb/Target/Process.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/source/Target/Process.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 0f9b0c07df9bd..cf0ddeed67e83 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2537,7 +2537,7 @@ void PruneThreadPlans();
/// \return
/// Returns the result of attempting to configure the feature.
virtual Status
- ConfigureStructuredData(ConstString type_name,
+ ConfigureStructuredData(llvm::StringRef type_name,
const StructuredData::ObjectSP &config_sp);
/// Broadcasts the given structured data object from the given plugin.
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 23b9cfdcce163..84d2010acefe4 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3922,7 +3922,7 @@ StructuredData::ObjectSP ProcessGDBRemote::GetSharedCacheInfo() {
}
Status ProcessGDBRemote::ConfigureStructuredData(
- ConstString type_name, const StructuredData::ObjectSP &config_sp) {
+ llvm::StringRef type_name, const StructuredData::ObjectSP &config_sp) {
return m_gdb_comm.ConfigureRemoteStructuredData(type_name, config_sp);
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index b04ebf20a0a39..aec3a8dfb9867 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -211,7 +211,7 @@ class ProcessGDBRemote : public Process,
lldb::addr_t image_count) override;
Status
- ConfigureStructuredData(ConstString type_name,
+ ConfigureStructuredData(llvm::StringRef type_name,
const StructuredData::ObjectSP &config_sp) override;
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos() override;
diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
index 60e94b89e37e9..a5818915773c4 100644
--- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
+++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
@@ -822,8 +822,8 @@ class EnableCommand : public CommandObjectParsed {
// Send configuration to the feature by way of the process. Construct the
// options we will use.
auto config_sp = m_options_sp->BuildConfigurationData(m_enable);
- const Status error = process_sp->ConfigureStructuredData(
- ConstString(GetDarwinLogTypeName()), config_sp);
+ const Status error =
+ process_sp->ConfigureStructuredData(GetDarwinLogTypeName(), config_sp);
// Report results.
if (!error.Success()) {
@@ -1831,8 +1831,8 @@ void StructuredDataDarwinLog::EnableNow() {
// We can run it directly.
// Send configuration to the feature by way of the process.
- const Status error = process_sp->ConfigureStructuredData(
- ConstString(GetDarwinLogTypeName()), config_sp);
+ const Status error =
+ process_sp->ConfigureStructuredData(GetDarwinLogTypeName(), config_sp);
// Report results.
if (!error.Success()) {
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 05e8a0ad9c477..4059660e94266 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -6007,7 +6007,7 @@ Status Process::GetMemoryRegions(lldb_private::MemoryRegionInfos ®ion_list) {
}
Status
-Process::ConfigureStructuredData(ConstString type_name,
+Process::ConfigureStructuredData(llvm::StringRef type_name,
const StructuredData::ObjectSP &config_sp) {
// If you get this, the Process-derived class needs to implement a method to
// enable an already-reported asynchronous structured data feature. See
More information about the lldb-commits
mailing list