Skip to content

Commit 12f4e11

Browse files
committed
[lldb][NFCI] Remove unneeded use of ConstString from StructuredDataDarwinLog
1 parent 5d87665 commit 12f4e11

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,8 +1254,6 @@ void StructuredDataDarwinLog::ModulesDidLoad(Process &process,
12541254
return;
12551255
}
12561256

1257-
const ConstString logging_module_name = ConstString(logging_module_cstr);
1258-
12591257
// We need to see libtrace in the list of modules before we can enable
12601258
// tracing for the target process.
12611259
bool found_logging_support_module = false;
@@ -1266,7 +1264,7 @@ void StructuredDataDarwinLog::ModulesDidLoad(Process &process,
12661264

12671265
auto &file_spec = module_sp->GetFileSpec();
12681266
found_logging_support_module =
1269-
(file_spec.GetFilename() == logging_module_name);
1267+
(file_spec.GetFilename() == logging_module_cstr);
12701268
if (found_logging_support_module)
12711269
break;
12721270
}
@@ -1276,8 +1274,7 @@ void StructuredDataDarwinLog::ModulesDidLoad(Process &process,
12761274
"StructuredDataDarwinLog::%s logging module %s "
12771275
"has not yet been loaded, can't set a breakpoint "
12781276
"yet (process uid %u)",
1279-
__FUNCTION__, logging_module_name.AsCString(),
1280-
process.GetUniqueID());
1277+
__FUNCTION__, logging_module_cstr, process.GetUniqueID());
12811278
return;
12821279
}
12831280

@@ -1287,8 +1284,7 @@ void StructuredDataDarwinLog::ModulesDidLoad(Process &process,
12871284
LLDB_LOGF(log,
12881285
"StructuredDataDarwinLog::%s post-init hook breakpoint "
12891286
"set for logging module %s (process uid %u)",
1290-
__FUNCTION__, logging_module_name.AsCString(),
1291-
process.GetUniqueID());
1287+
__FUNCTION__, logging_module_cstr, process.GetUniqueID());
12921288

12931289
// We need to try the enable here as well, which will succeed in the event
12941290
// that we're attaching to (rather than launching) the process and the

0 commit comments

Comments
 (0)